From e4a1c21749d42fcdf4c6ce89899d62a2501331ff Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Thu, 29 Oct 2020 14:04:28 +0100 Subject: Run all CI build pipelines on pull request --- .github/workflows/build-api.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/build-api.yml (limited to '.github/workflows/build-api.yml') diff --git a/.github/workflows/build-api.yml b/.github/workflows/build-api.yml new file mode 100644 index 00000000..5bbc30c4 --- /dev/null +++ b/.github/workflows/build-api.yml @@ -0,0 +1,36 @@ +name: Build API + +on: + push: + paths: + - 'api/**' + pull_request: + branches: [master] + +defaults: + run: + working-directory: api + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + python: [3.8] + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Lint with pylint + run: | + ./check.sh + - name: Test with pytest + run: | + pytest opendc -- cgit v1.2.3