-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (51 loc) · 1.76 KB
/
tests.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
defaults:
run:
shell: bash
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build test docker image
run: docker build . --file Dockerfile --target test --build-arg BASE_IMAGE_PYTHON_VERSION=${{ matrix.python-version }} --tag curryer-${{ matrix.python-version }}-test:latest
- name: Run test docker image
env:
SPACETRACK_USER: ${{ secrets.SPACETRACK_USER }}
SPACETRACK_PSWD: ${{ secrets.SPACETRACK_PSWD }}
run: docker run -i --rm -e SPACETRACK_USER="$SPACETRACK_USER" -e SPACETRACK_PSWD="$SPACETRACK_PSWD" curryer-${{ matrix.python-version }}-test:latest
demo:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python-version: ['3.11']
defaults:
run:
shell: bash
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build demo docker image
run: docker build . --file Dockerfile --target demo --build-arg BASE_IMAGE_PYTHON_VERSION=${{ matrix.python-version }} --tag curryer-${{ matrix.python-version }}-demo:latest
- name: Run demo docker image
run: docker run -i --rm curryer-${{ matrix.python-version }}-demo:latest