From 4c92b7a28b95834f009fc3cccec9fe9ee5a33442 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Mon, 24 Feb 2020 13:45:11 -0600 Subject: [PATCH] Run unit tests in GitHub Actions Rename `lint.yml` to `tests.yml` to allow us to put more jobs under the same test name. Signed-off-by: Major Hayden --- .github/workflows/{lint.yml => tests.yml} | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) rename .github/workflows/{lint.yml => tests.yml} (56%) diff --git a/.github/workflows/lint.yml b/.github/workflows/tests.yml similarity index 56% rename from .github/workflows/lint.yml rename to .github/workflows/tests.yml index 496a44bd..c39a214e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,4 @@ -name: Linting +name: Tests # NOTE(mhayden): Restricting branches prevents jobs from being doubled since # a push to a pull request triggers two events. @@ -29,3 +29,23 @@ jobs: run: | cd osbuild pylint osbuild runners/* assemblers/* stages/* sources/* + unit_tests: + name: "unit" + runs-on: ubuntu-latest + container: + image: docker.io/library/python:3.7 + steps: + - name: Clone repository + uses: actions/checkout@v2 + with: + path: osbuild + + - name: Run test_osbuild + run: | + cd osbuild + python3 -m unittest -v test.test_osbuild + + - name: Run test_objectstore + run: | + cd osbuild + python3 -m unittest -v test.test_objectstore