-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (40 loc) · 1.29 KB
/
build_and_test_using_docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Copyright (C) 2021 Sebastian Pipping <sebastian@pipping.org>
# Licensed under GNU Affero GPL v3 or later
name: Build and test using Docker
on:
- pull_request
- push
jobs:
build_and_test:
name: Build and test using Docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Set up Python 3.11
uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1
with:
python-version: 3.11
- name: Install dependencies
run: |-
pip install \
--disable-pip-version-check \
--user \
--no-warn-script-location \
'urllib3<2' \
docker-compose
echo "PATH=${HOME}/.local/bin:${PATH}" >> "${GITHUB_ENV}"
- name: Configure Docker environment
run: |-
docker network create --internal ssl-reverse-proxy
tee .env <<-EOF
WDN_POSTGRES_NAME=wdn111
WDN_POSTGRES_USER=wdn222
WDN_POSTGRES_PASSWORD=wdn333
WDN_SECRET_KEY=wdn444
EOF
- name: Build Docker image
run: |-
docker-compose build
- name: Run tests using Docker
run: |-
docker-compose run wnpp-debian-net test -v2