diff --git a/.github/workflows/lint_and_test.yml b/.github/workflows/lint_and_test.yml new file mode 100644 index 0000000..902498d --- /dev/null +++ b/.github/workflows/lint_and_test.yml @@ -0,0 +1,41 @@ +name: Lint and Test + +on: [pull_request] + +jobs: + test: + runs-on: ubuntu-latest + container: + image: divio/multi-python + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.9 + + - name: Cache dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Install dependencies + run: | + pip install -r requirements.txt + + - name: Run tests + run: | + bash download_fixtures.sh + tox + + - name: Upload coverage to GitHub Artifacts + uses: actions/upload-artifact@v4 + with: + name: coverage + path: htmlcov/ \ No newline at end of file