-
Notifications
You must be signed in to change notification settings - Fork 162
86 lines (83 loc) · 2.25 KB
/
tests.yml
File metadata and controls
86 lines (83 loc) · 2.25 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
name: Tests
permissions:
contents: read
on:
pull_request:
merge_group:
jobs:
namespaces:
strategy:
matrix:
platform:
- ubuntu-latest
- macos-latest
- windows-latest
products:
- account
- applesilicon
- baremetal
- billing
- block
- cockpit
- container
- dedibox
- domain
- edge_services
- flexibleip
- function
- iam
- inference
- init
- instance
- iot
- ipam
- jobs
- k8s
- key_manager
- lb
- login
- marketplace
- mnq
- mongodb
- object
- rdb
- redis
- registry
- serverless_sqldb
- secret
- tem
- vpc
- vpcgw
- webhosting
runs-on: ${{ matrix.platform }}
steps:
- name: Set git to use LF to avoid problem with goldens on windows
run: |
git config --global core.autocrlf false
git config --global core.eol lf
# Checkout should always be before setup-go to ensure caching is working
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: Install Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: stable
- name: Run tests
run: go tool gotestsum --format github-actions -- -v ./internal/namespaces/${{ matrix.products }}/...
- name: Execute main binary # Test the runtime for potential panics.
run: go run cmd/scw/main.go -h
others:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: Install Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: stable
- name: Run tests outside of products namespaces
run: go list ./... | grep -v 'internal/namespaces' | xargs go tool gotestsum --format github-actions -- -v