forked from UN-SPIDER/burn-severity-mapping-EO
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (25 loc) · 853 Bytes
/
pytest.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
name: Build Prod and PyTest (Burn Backend)
on:
pull_request:
branches:
- main
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Docker image - Burn Backend
run: docker build -t prod -f .deployment/burn_backend/prod.Dockerfile .
- name: Create Docker container with pytest.ini
run: |
docker create --name temp_container prod
docker cp pytest.ini temp_container:/
docker commit temp_container prod:with_pytest_ini
- name: Run tests (override entrypoint to run tests rather than deploy)
run: |
docker run \
--entrypoint /bin/bash \
-v ${{ github.workspace }}/tests:/tests \
prod:with_pytest_ini \
-c "conda run -n burn-severity-prod pytest -svv /tests"