From e0248f83ffafaf57d4e3708efd56a1c4a1cb6f26 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 25 Jun 2022 22:36:52 +0100 Subject: [PATCH] Add lint/test to CI for main (codecov) --- .github/workflows/ci-branch-main.yml | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/ci-branch-main.yml b/.github/workflows/ci-branch-main.yml index 489583f..31c9ccc 100644 --- a/.github/workflows/ci-branch-main.yml +++ b/.github/workflows/ci-branch-main.yml @@ -11,6 +11,41 @@ on: - 'renovate.json' jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install dependencies + run: pip install -r requirements.txt && pip install -r requirements-dev.txt + - name: Lint + run: pylint --recursive=yes . + + test: + name: Run unit tests + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ '3.10' ] + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: pip install -r requirements.txt && pip install -r requirements-dev.txt + - name: Run test suite + run: coverage run -m py.test -v + - name: Upload Coverage to Codecov + uses: codecov/codecov-action@v3 + build: runs-on: ubuntu-latest steps: