-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (113 loc) · 4.27 KB
/
build-test.yml
File metadata and controls
116 lines (113 loc) · 4.27 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Build and Test
on: push
concurrency:
group: "${{ github.ref }}"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
env:
GIT_STRATEGY: clone
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 20
lfs: true
- name: Build
uses: docker/build-push-action@v6
id: build
with:
file: dockerfiles/Dockerfile
tags: template-test:latest
outputs: type=docker,dest=${{ runner.temp }}/template-test.tar
- name: Upload
uses: actions/upload-artifact@v4
with:
name: template-test
path: ${{ runner.temp }}/template-test.tar
test-cli-template:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download
uses: actions/download-artifact@v5
with:
name: template-test
path: ${{ runner.temp }}
- name: Test
run: |
docker load --input ${{ runner.temp }}/template-test.tar
docker run -u `id -u`:`id -g` -w /src_cli template-test pixi run ruff check
docker run -u `id -u`:`id -g` -w /src_cli template-test pixi run ruff format --check
docker run -u `id -u`:`id -g` -w /src_cli template-test pixi run mypy .
docker run -u `id -u`:`id -g` -w /src_cli template-test pixi run pytest .
test-library-template:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download
uses: actions/download-artifact@v5
with:
name: template-test
path: ${{ runner.temp }}
- name: Test
run: |
docker load --input ${{ runner.temp }}/template-test.tar
docker run -u `id -u`:`id -g` -w /src_library template-test pixi run ruff check
docker run -u `id -u`:`id -g` -w /src_library template-test pixi run ruff format --check
docker run -u `id -u`:`id -g` -w /src_library template-test pixi run mypy .
docker run -u `id -u`:`id -g` -w /src_library template-test pixi run pytest .
test-ndip-tool-template:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download
uses: actions/download-artifact@v5
with:
name: template-test
path: ${{ runner.temp }}
- name: Test
run: |
docker load --input ${{ runner.temp }}/template-test.tar
docker run -u `id -u`:`id -g` -w /src_ndip_tool template-test pixi run ruff check
docker run -u `id -u`:`id -g` -w /src_ndip_tool template-test pixi run ruff format --check
docker run -u `id -u`:`id -g` -w /src_ndip_tool template-test pixi run mypy .
docker run -u `id -u`:`id -g` -w /src_ndip_tool template-test pixi run pytest .
test-nova-application-template:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download
uses: actions/download-artifact@v5
with:
name: template-test
path: ${{ runner.temp }}
- name: Test
run: |
docker load --input ${{ runner.temp }}/template-test.tar
docker run -u `id -u`:`id -g` -w /src_nova_application template-test pixi run ruff check
docker run -u `id -u`:`id -g` -w /src_nova_application template-test pixi run ruff format --check
docker run -u `id -u`:`id -g` -w /src_nova_application template-test pixi run mypy .
docker run -u `id -u`:`id -g` -w /src_nova_application template-test pixi run pytest .
test-tutorial-template:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download
uses: actions/download-artifact@v5
with:
name: template-test
path: ${{ runner.temp }}
- name: Test
run: |
docker load --input ${{ runner.temp }}/template-test.tar
docker run -u `id -u`:`id -g` -w /src_tutorial template-test pixi run ruff check
docker run -u `id -u`:`id -g` -w /src_tutorial template-test pixi run ruff format --check
docker run -u `id -u`:`id -g` -w /src_tutorial template-test pixi run mypy .
docker run -u `id -u`:`id -g` -w /src_tutorial template-test pixi run pytest .