-
Notifications
You must be signed in to change notification settings - Fork 9
43 lines (34 loc) · 1.06 KB
/
Copy pathpython-app-test.yml
File metadata and controls
43 lines (34 loc) · 1.06 KB
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
#
# Error: docker-compose command not found: https://github.com/orgs/community/discussions/116610
# Migrate to Compose V2: https://docs.docker.com/compose/migrate/
name: Test
on:
push:
branches: [ "main", "develop" ]
pull_request:
branches: [ "main", "develop" ]
permissions:
contents: read
jobs:
test:
name: Run test suite
runs-on: ubuntu-latest
env:
COMPOSE_FILE: .devcontainer/docker-compose.yml
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Make envfile
uses: SpicyPizza/create-envfile@v2.0
with:
envkey_DEBUG: false
directory: .devcontainer
fail_on_empty: false
- name: Build docker images
run: docker compose build
- name: UnitTest with pytest
run: |
docker compose up -d
docker compose exec -T ooodev_app pytest