diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 83f8e1900..eefb2c512 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -28,8 +28,43 @@ jobs: name: dist path: dist + test-unit: + name: ๐Ÿงช Unit tests + strategy: + matrix: + python: ["2.7", "3.7", "3.8"] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: ๐Ÿ— Set up Python ${{ matrix.python }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python }} + - name: ๐Ÿ— Set up test dependencies + run: | + pip install -e .[develop] + - name: ๐Ÿš€ Run test suite + run: | + pytest + + test-flake8: + name: ๐Ÿงช Flake8 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: ๐Ÿ— Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + - name: ๐Ÿ— Set up test dependencies + run: | + pip install -e .[develop] + - name: ๐Ÿš€ Run test suite + run: | + flake8 src/ tests setup.py + test-install: - name: ๐Ÿงช Test install + name: ๐Ÿงช Installation tests needs: build strategy: matrix: @@ -56,7 +91,7 @@ jobs: pip install dist/OctoPrint-*.tar.gz test-e2e: - name: ๐Ÿงช Test E2E + name: ๐Ÿงช E2E tests needs: build runs-on: ubuntu-16.04 steps: @@ -106,6 +141,7 @@ jobs: name: ๐Ÿ“ฆ Publish on TestPyPI if: github.event_name == 'release' needs: + - test-unit - test-install - test-e2e runs-on: ubuntu-latest