diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..72850172 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: Test + +on: + push: + branches: + - master + pull_request: + branches: + - master # Only run when PR is raised for master + +# This ensures for a single PR one job is run in case of multiple runs +concurrency: + group: build-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + # Lint the Code + - name: Black Validation + uses: psf/black@stable + - name: Check Flake8 Formatting + uses: py-actions/flake8@v2 + # Run Tests + - name: Run Tests + run: docker-compose -f "docker-compose.test.yml" up --build