CI: remove lighthouse audit #430
This file contains hidden or 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: Test | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: pnpm/action-setup@v4 | |
| - name: Get secrets | |
| run: | | |
| cd config | |
| mkdir secrets | |
| echo "${{ secrets.crowdin_key }}" > secrets/crowdin_key.txt | |
| - name: esbuild | |
| run: | | |
| pnpm i | |
| pnpm run ci-build | |
| # Remove gitignore rule for public folder | |
| sed -i 's/public\///' .gitignore | |
| - name: Start server | |
| run: | | |
| cd public | |
| pnpx http-server --port 8080 & | |
| - name: Audit URLs using Lighthouse | |
| uses: treosh/lighthouse-ci-action@v3 | |
| with: | |
| urls: http://localhost:8080/ | |
| uploadArtifacts: true # save results as an action artifacts | |
| temporaryPublicStorage: true # upload lighthouse report to the temporary storage | |
| runs: 3 # Asserting against a single run can lead to flaky performance assertions | |
| - name: Install dependencies | |
| run: | | |
| cd unit_tests | |
| # sudo apt-get install xvfb firefox | |
| python3 -m pip install -r requirements.txt | |
| - name: Gecko setup | |
| run: | | |
| wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz | |
| sudo sh -c 'tar -x geckodriver -zf geckodriver-v0.24.0-linux64.tar.gz -O > /usr/bin/geckodriver' | |
| sudo chmod +x /usr/bin/geckodriver | |
| rm geckodriver-v0.24.0-linux64.tar.gz | |
| export PATH=$PATH:/usr/bin/geckodriver | |
| - name: Test with pytest | |
| run: | | |
| cd unit_tests | |
| python3 -m pytest -s | |
| auto-merge: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: ahmadnassri/action-dependabot-auto-merge@v2 | |
| with: | |
| github-token: ${{ secrets.AUTOMERGE_TOKEN }} |