Update dependency jest to v30 #46
Workflow file for this run
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: build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| pages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Disable AppArmor # https://github.com/puppeteer/puppeteer/issues/12818 | |
| run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Analysing the code with prettier | |
| run: npm run prettier-check | |
| - name: Run tests with jest | |
| run: npm run test | |
| - name: Use Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.13 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pylint | |
| pip install pytest | |
| pip install -r requirements.txt | |
| - name: Analysing the code with pylint | |
| run: | | |
| pylint $(git ls-files '*.py') | |
| - name: Run tests with pytest | |
| run: | | |
| python -m pytest | |
| - name: Generate places.geojson | |
| if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') | |
| run: | | |
| python -c " | |
| import os | |
| import random | |
| import time | |
| def random_ip(): | |
| return '.'.join(str(random.randint(0, 255)) for _ in range(4)) | |
| ips = [random_ip() for _ in range(420)] | |
| for ip in ips: | |
| time.sleep(1.5) # Ratelimit 45 request / minute | |
| os.system(f'python ./script/fail2ban_map.py add {ip}') | |
| " | |
| - name: Configure Pages | |
| if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact for deployment | |
| if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./public | |
| - name: Deploy to GitHub Pages | |
| if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') | |
| uses: actions/deploy-pages@v4 |