Add sqlfluff linter tests and diagnostics handling #127
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: CI | |
| on: | |
| pull_request: {} | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - name: Build the docker image | |
| run: | | |
| docker build -t omegaup/hook_tools . | |
| - name: Test | |
| run: | | |
| docker run \ | |
| --rm \ | |
| --user "$(id -u):$(id -g)" \ | |
| --volume "${PWD}:/src" \ | |
| --entrypoint /bin/bash \ | |
| omegaup/hook_tools \ | |
| /src/test.sh --diagnostics-output=github | |
| python-tests: | |
| runs-on: ubuntu-latest | |
| env: | |
| TRAVIS: "true" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.13"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install pylint pep8 | |
| - name: Run unit tests | |
| run: python -m unittest tests.linters_test | |
| - name: Validate repository | |
| continue-on-error: true | |
| run: PYTHONPATH=src python -m omegaup_hook_tools.lint validate --all-files |