-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (68 loc) · 2.18 KB
/
ci-test-run.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: ci build
on: [pull_request, workflow_dispatch]
jobs:
test:
runs-on: ${{ matrix.os }}
env:
IMAGE_NAME: mcr.microsoft.com/windows/nanoserver:ltsc2022-amd64
strategy:
matrix:
include:
- os: ubuntu-latest
container: 'ubuntu:22.04'
artifact: 'ubuntu'
- os: ubuntu-latest
container: 'alpine:3.15.0'
artifact: 'alpine'
- os: windows-latest
artifact: 'windows'
- os: windows-latest
artifact: 'nanoserver'
container: ${{ matrix.container }}
steps:
- name: Install Ubuntu packages
if: matrix.artifact == 'ubuntu'
run: |
apt update
apt install -y busybox dos2unix python3
- name: Install Alpine packages
if: matrix.artifact == 'alpine'
run: |
apk add --no-cache bash python3-dev
- uses: actions/checkout@v3
- name: ci test-run (non windows)
if: matrix.os != 'windows-latest'
run: .tests/ci-test-run.sh
- name: ci test-run (windows)
if: matrix.artifact == 'windows'
shell: cmd
run: call .tests\ci-test-run.bat
- name: pull (nanoserver) container ${{ env.IMAGE_NAME }}
if: matrix.artifact == 'nanoserver'
run: |
docker pull ${{ env.IMAGE_NAME }}
docker images ${{ env.IMAGE_NAME }}
- name: ci test-run (nanoserver)
if: matrix.artifact == 'nanoserver'
run: docker container run --rm -v ${{ github.workspace }}:C:\app -w C:\app ${{ env.IMAGE_NAME }} C:\app\.tests\ci-test-run.bat
test-create:
needs: test
runs-on: ${{ matrix.os }}
name: Run test-create
strategy:
matrix:
include:
- os: ubuntu-latest
artifact: 'ubuntu'
- os: windows-latest
artifact: 'windows'
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v3
- name: External test-run (non windows)
if: matrix.os != 'windows-latest'
run: .tests/test-run.sh -- testExternalCreate
- name: External test-run (windows)
if: matrix.os == 'windows-latest'
shell: cmd
run: call .tests\test-run.bat -- testExternalCreate