diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..62aea74 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.11", "3.12"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install pytest + run: python -m pip install --upgrade pip pytest + - name: Compile check + run: python -m compileall -q scripts + - name: Run tests + # python -m pytest puts the repo root on sys.path so the tests can + # import scripts.asqav_hook; the bare pytest console script cannot. + run: python -m pytest tests/ -q + + ci-ok: + runs-on: ubuntu-latest + needs: test + steps: + - run: echo "CI passed"