-
Notifications
You must be signed in to change notification settings - Fork 5
34 lines (31 loc) · 956 Bytes
/
test.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
name: Run tests
on: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-22.04
container:
image: python:3.11
volumes:
- /var/run/docker.sock:/var/run/docker.sock
env:
TESTCONTAINERS_HOST_OVERRIDE: "host.docker.internal"
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true
- name: Run tests
run: |
# PyYaml is required until docker-compose is migrated to v2
pip install pyyaml==5.3.1
pip install docker==6.1.3 docker-compose
poetry install --no-interaction --no-ansi
docker-compose version
poetry run python -m pytest