-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (72 loc) · 2.18 KB
/
docker-tests.yml
File metadata and controls
90 lines (72 loc) · 2.18 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Docker Tests (Disabled)
# Temporarily disabled - using legacy workflow instead
# Re-enable after debugging Docker build issues
on:
workflow_dispatch:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
docker-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build test image
uses: docker/build-push-action@v5
with:
context: .
target: test
tags: rocket-simulator:test
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run tests in Docker
run: docker run --rm rocket-simulator:test
- name: Build production image
uses: docker/build-push-action@v5
with:
context: .
target: prod
tags: rocket-simulator:latest
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
multi-python-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build and test with Python ${{ matrix.python-version }}
run: |
docker build \
--build-arg PYTHON_VERSION=${{ matrix.python-version }} \
--target test \
-t rocket-simulator:test-py${{ matrix.python-version }} \
-f Dockerfile.multi .
docker run --rm rocket-simulator:test-py${{ matrix.python-version }}
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install linting tools
run: |
python -m pip install --upgrade pip
pip install black pylint numpy scipy matplotlib
pip install -e . --no-deps
- name: Check code formatting
run: black --check src/ tests/ || true
continue-on-error: true
- name: Run pylint
run: pylint src/ --disable=all --enable=E || true
continue-on-error: true