forked from ghostunnel/ghostunnel
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (73 loc) · 2.18 KB
/
test.yml
File metadata and controls
76 lines (73 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
---
name: Test
permissions:
contents: read
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: Tests
strategy:
matrix:
version: [1.26.x]
os: [ubuntu-22.04, ubuntu-24.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.version }}
id: go
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python
if: matrix.os != 'windows-latest'
uses: actions/setup-python@v6
with:
python-version: '3.11.x'
- name: Install test dependencies (Linux)
if: contains(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install -y default-jre-headless
- name: Run tests
run: go tool mage -v test:all
- name: Codecov upload
if: ${{ github.actor != 'dependabot[bot]' && matrix.os != 'windows-latest' }}
uses: codecov/codecov-action@v5
with:
files: ./coverage/all.profile
flags: ${{ contains(matrix.os, 'ubuntu') && 'linux' || (contains(matrix.os, 'macos') && 'darwin' || 'windows') }}
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
test-docker:
name: Tests (PKCS#11/SoftHSM)
strategy:
matrix:
version: [1.26]
os: [ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.version }}
- name: Run tests in Docker
run: GO_VERSION=${{ matrix.version }} go tool mage -v test:docker
- name: Codecov upload
uses: codecov/codecov-action@v5
if: ${{ github.actor != 'dependabot[bot]' }}
with:
files: ./coverage/all.profile
flags: linux
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}