From 477edf666f839eead6c3a8a7d90704f0903846c1 Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Fri, 22 Sep 2023 12:06:18 +0100 Subject: [PATCH] Update testing workflow --- .github/workflows/python-linting.yml | 11 ----------- .github/workflows/python-testing.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 11 deletions(-) delete mode 100644 .github/workflows/python-linting.yml create mode 100644 .github/workflows/python-testing.yml diff --git a/.github/workflows/python-linting.yml b/.github/workflows/python-linting.yml deleted file mode 100644 index e9ba690..0000000 --- a/.github/workflows/python-linting.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Lint - -on: [push] - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: psf/black@stable - - uses: chartboost/ruff-action@v1 diff --git a/.github/workflows/python-testing.yml b/.github/workflows/python-testing.yml new file mode 100644 index 0000000..1d26bf2 --- /dev/null +++ b/.github/workflows/python-testing.yml @@ -0,0 +1,27 @@ +name: Lint-and-test + +on: [push] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: psf/black@stable + - uses: chartboost/ruff-action@v1 + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: 3.8 + cache: 'pip' # caching pip dependencies + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -e . + - name: Run tests + run: | + python -m pytest --import-mode=append tests/