From e98d44e6304f1761cd8c178c50ad6e9fbb259e2c Mon Sep 17 00:00:00 2001 From: Victor Ruiz Date: Thu, 4 Apr 2024 12:16:09 +0200 Subject: [PATCH 1/2] 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' }} From 6763b9494d5a127ecdc63eea0fecd7f71d7f8998 Mon Sep 17 00:00:00 2001 From: Victor Ruiz Date: Thu, 4 Apr 2024 12:17:27 +0200 Subject: [PATCH 2/2] Fix tox tests configuration --- .github/workflows/main.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a070534..1a37dd4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,7 +29,5 @@ jobs: run: | python -m pip install --upgrade pip pip install tox codecov - - name: Run base tests - run: tox -e base - - name: Run all test + - name: Run tests run: tox -e ${{ matrix.tox || 'py' }}