summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2021-02-26 00:01:10 +0200
committerGitHub <noreply@github.com>2021-02-26 00:01:10 +0200
commit84c0541baee260fa3293f2d693c390911962d888 (patch)
treebf9ab9d25a2032dafe8df64e6dadfef31ff7a978 /.github
parent41e1063f4ce708c3790acf640412da385acdbb8f (diff)
downloadapscheduler-84c0541baee260fa3293f2d693c390911962d888.tar.gz
Fixed test setup issues (#493)
* Pinned freezegun to 1.0.0 * Used docker-compose to set up services * Removed the services we don't need yet * Used a less specific Python version
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/codeqa-test.yml43
1 files changed, 24 insertions, 19 deletions
diff --git a/.github/workflows/codeqa-test.yml b/.github/workflows/codeqa-test.yml
index d7e6e72..7f39197 100644
--- a/.github/workflows/codeqa-test.yml
+++ b/.github/workflows/codeqa-test.yml
@@ -27,36 +27,41 @@ jobs:
- name: Run isort
run: isort -c apscheduler tests
- test:
+ test-linux:
needs: [lint]
strategy:
fail-fast: false
matrix:
- os: [ubuntu-latest, macos-latest, windows-latest]
- python-version: [3.7, 3.9.0]
- services:
- postgres:
- image: postgres
- env:
- POSTGRES_USER: postgres
- POSTGRES_PASSWORD: secret
- POSTGRES_DB: testdb
- ports:
- - 5432:5432
- # needed because the postgres container does not provide a healthcheck
- options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
- mongodb:
- image: mongo
- ports:
- - 27017:27017
- runs-on: ${{ matrix.os }}
+ python-version: [3.7, 3.9]
+ runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
+ - name: Start external services
+ run: docker-compose up -d
- name: Install the project and its dependencies
run: pip install -e .[test,cbor,postgresql,mongodb]
- name: Test with pytest
run: pytest
+
+ test-others:
+ needs: [lint]
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [macos-latest, windows-latest]
+ python-version: [3.7, 3.9]
+ runs-on: ${{ matrix.os }}
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install the project and its dependencies
+ run: pip install -e .[test,cbor]
+ - name: Test with pytest
+ run: pytest