Skip to content

Commit 8c10703

Browse files
UPDATE Test ci
1 parent 6e85b6b commit 8c10703

File tree

2 files changed

+35
-5
lines changed

2 files changed

+35
-5
lines changed

.github/workflows/development_pipeline.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
POSTGRES_DB: db_test
1919
ports:
2020
- 5432:5432
21-
# needed because the postgres container does not provide a healthcheck
2221
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
2322
steps:
2423
- name: Checkout code
@@ -40,7 +39,7 @@ jobs:
4039
- name: Install Python dependencies
4140
run: python -m pip install -r requirements.txt
4241

43-
- name: Unit Tests
42+
- name: Unit Tests and Integration Tests
4443
env:
4544
DATABASE_TEST_URL: postgresql://db_user:db_password@localhost/db_test
4645
run: python -m flask tests

.github/workflows/staging_pipeline.yaml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,39 @@ on:
33
pull_request:
44
branches: staging
55
jobs:
6-
my-job:
6+
build-test:
77
runs-on: ubuntu-latest
8+
services:
9+
postgres:
10+
image: postgres:13.3
11+
env:
12+
POSTGRES_USER: db_user
13+
POSTGRES_PASSWORD: db_password
14+
POSTGRES_DB: db_test
15+
ports:
16+
- 5432:5432
17+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
818
steps:
9-
- name: my-step
10-
run: echo "Hello World with Github Actions"
19+
- name: Checkout code
20+
uses: actions/checkout@v2
21+
22+
- name: Cache Python dependencies
23+
uses: actions/cache@v2
24+
with:
25+
path: ~/.cache/pip
26+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
27+
restore-keys: |
28+
${{ runner.os }}-pip-
29+
30+
- name: Set up Python 3.9
31+
uses: actions/setup-python@v2
32+
with:
33+
python-version: 3.9
34+
35+
- name: Install Python dependencies
36+
run: python -m pip install -r requirements.txt
37+
38+
- name: Unit Tests and Integration Tests
39+
env:
40+
DATABASE_TEST_URL: postgresql://db_user:db_password@localhost/db_test
41+
run: python -m flask tests

0 commit comments

Comments
 (0)