From e98d44e6304f1761cd8c178c50ad6e9fbb259e2c Mon Sep 17 00:00:00 2001 From: Victor Ruiz Date: Thu, 4 Apr 2024 12:16:09 +0200 Subject: [PATCH] Github action workflow for linting and testing --- .github/workflows/main.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..a070534 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,35 @@ +name: Check test and code linting +on: [push] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: pre-commit/action@v3.0.0 + + build: + runs-on: ubuntu-20.04 + strategy: + matrix: + include: + - python-version: "3.8" + tox: min + - python-version: "3.9" + - python-version: "3.10" + - python-version: "3.11" + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox codecov + - name: Run base tests + run: tox -e base + - name: Run all test + run: tox -e ${{ matrix.tox || 'py' }}