ci: Add lint/test workflow #3
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: Lint and Test Lists | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Python 3 | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: 3.13 | |
| cache: 'pip' # caching pip dependencies | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Install ruff | |
| run: pip install ruff | |
| - name: Run ruff check | |
| run: ruff check | |
| - name: Generate list files | |
| run: | | |
| mkdir -p lists | |
| python3 update-lists.py --output-dir lists | |
| - name: Upload lists as artifact | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: adblock-lists | |
| path: lists/ | |
| retention-days: 1 |