-
-
Notifications
You must be signed in to change notification settings - Fork 3
106 lines (87 loc) · 2.6 KB
/
test-worker.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Run Test Suite
on:
push:
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
# This test suite will run for every language version for every OS defined in the matrix
tests-os-matrix:
name: "${{ matrix.language_version }} on ${{ matrix.os }}"
runs-on: "${{ matrix.os }}-latest"
strategy:
fail-fast: false
matrix:
os:
- ubuntu
- windows
- macos
# Place your language versions you want to test
language_version: ["v1.0.0", "v2.0.0"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Setup your language (This is specific to each language)
# - name: Set up language ${{ matrix.language_version }}
# uses: actions/setup-python@v5
# with:
# language-version: ${{ matrix.language_version }}
- name: Install dependencies
run: |
set -xe
echo "Installed dependencies"
# python -m pip install -r requirements.txt (for example)
- name: Build project
run: |
set -xe
echo "Building"
# Place your code to build your project here
- name: Testing
run: |
set -xe
echo "Testing project"
# Place your code to test your project here
# This test will run once
tests:
name: "Testing"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Setup your language (This is specific to each language)
# - name: Set up language ${{ matrix.language_version }}
# uses: actions/setup-python@v5
# with:
# language-version: ${{ matrix.language_version }}
- name: Install dependencies
run: |
set -xe
echo "Installed dependencies"
# python -m pip install -r requirements.txt (for example)
- name: Build project
run: |
set -xe
echo "Building"
# Place your code to build your project here
- name: Testing
run: |
set -xe
echo "Testing project"
# Place your code to test your project here
# It is recommended to require this check to pass before merging a pull request
check:
if: always()
name: Tests Successful
runs-on: ubuntu-latest
needs: [tests-os-matrix, tests]
steps:
- name: Whether the whole test suite passed
uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}