From b3aa65eb7d96b49643d4bdd75232c9edf790ce9b Mon Sep 17 00:00:00 2001 From: Sebastiaan Zeeff Date: Tue, 17 Nov 2020 00:50:37 +0100 Subject: Add unit test step to workflow --- .github/workflows/lint-test.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index d774516..b0e44eb 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -67,3 +67,18 @@ jobs: - name: Run linter run: "docker exec snekbox_test /bin/bash -c 'flake8 \ --format \"::error file=%(path)s,line=%(row)d,col=%(col)d::[flake8] %(code)s: %(text)s\"'" + + - name: Disable swap memory + run: sudo swapoff -a + + - name: Run unit tests and generate coverage report + run: "docker exec snekbox_test /bin/bash -c \ + 'coverage run -m unittest; coverage report -m'" + + # This step will publish the coverage reports coveralls.io and + # print a "job" link in the output of the GitHub Action + - name: Publish coverage report to coveralls.io + if: always() + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: coveralls -- cgit v1.2.3