-
Notifications
You must be signed in to change notification settings - Fork 39
56 lines (56 loc) · 1.81 KB
/
test.yaml
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
name: (all packages) Unit tests
on:
push:
tags:
- v*
pull_request:
jobs:
unit:
strategy:
fail-fast: false
matrix:
project:
- name: root
path: ./lib/
- name: gotestloghelper
path: ./tools/gotestloghelper/
- name: testlistgenerator
path: ./tools/testlistgenerator/
- name: ecrimagefetcher
path: ./tools/ecrimagefetcher/
- name: ghlatestreleasechecker
path: ./tools/ghlatestreleasechecker/
- name: asciitable
path: ./tools/asciitable/
- name: workflowresultparser
path: ./tools/workflowresultparser/
runs-on: ubuntu-latest
name: ${{ matrix.project.name }} unit tests
steps:
- name: Checkout the Repo
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Install gotestloghelper
run: cd lib && make gotestloghelper_build
- name: Install Nix
uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Load Nix
run: |
nix develop -c sh -c "cd ${{ matrix.project.path }} && \
go mod download"
- name: Run Tests
run: |
PATH=$PATH:$(go env GOPATH)/bin
export PATH
set -euo pipefail
# disabled, because we want to use a multiline output of go list command
# shellcheck disable=SC2046
nix develop -c sh -c "cd ${{ matrix.project.path }} && \
make test_unit"
- name: Publish Artifacts
if: failure()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: test-logs
path: /tmp/gotest.log