Update lint.yml #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint and Test Extension | |
on: | |
push: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: npm install | |
- run: npm install | |
working-directory: ./frontend | |
- run: npm run lint | |
name: Lint VSCode | |
- run: npm run lint-frontend | |
name: Lint Frontend | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: npm install | |
- run: npm install | |
working-directory: ./frontend | |
- run: npm run vscode:bundle | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y xvfb libgtk-3-0 libnss3 libxss1 libasound2 libx11-xcb1 libxkbfile1 libsecret-1-0 python3 python3-pip | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
- name: Check Python version | |
run: python3 --version | |
- name: Install Python dependencies | |
run: | | |
if [ -f requirements.txt ]; then | |
pip3 install -r requirements.txt | |
fi | |
- name: Start Xvfb | |
run: | | |
Xvfb :99 -ac -screen 0 1280x1024x24 -verbose > xvfb.log 2>&1 & | |
echo "Started Xvfb" | |
sleep 3 # Give Xvfb some time to start | |
- name: Set DISPLAY environment variable | |
run: | | |
echo "DISPLAY=:99" >> $GITHUB_ENV | |
- run: npm install | |
- run: npm install | |
working-directory: ./frontend | |
- name: Run tests | |
uses: GabrielBB/xvfb-action@v1 | |
with: | |
run: npm test |