diff options
author | 2020-11-17 00:50:37 +0100 | |
---|---|---|
committer | 2020-11-17 00:50:37 +0100 | |
commit | b3aa65eb7d96b49643d4bdd75232c9edf790ce9b (patch) | |
tree | fdb15fa7412cf655c60c52b81db30651a8a7948b | |
parent | Use proper quotation in docker run arguments (diff) |
Add unit test step to workflow
-rw-r--r-- | .github/workflows/lint-test.yaml | 15 |
1 files changed, 15 insertions, 0 deletions
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 |