-
Notifications
You must be signed in to change notification settings - Fork 23
49 lines (39 loc) Β· 1.19 KB
/
test.yaml
File metadata and controls
49 lines (39 loc) Β· 1.19 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
name: Go Test π
on: [push, pull_request]
jobs:
build:
name: πΉ Test with Go ${{ matrix.go-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version:
- 1.20.x
- 1.21.x
- 1.22.x
- 1.23.x
- 1.24.x
steps:
- name: π Checkout Repository
uses: actions/checkout@v4
- name: π οΈ Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: π¦ Install Dependencies
run: go mod download
- name: π Set CLOUDINARY_URL
run: |
export CLOUDINARY_URL=$(bash scripts/get_test_cloud.sh)
echo "CLOUDINARY_URL=$CLOUDINARY_URL" >> $GITHUB_ENV
echo "cloud_name: $(echo $CLOUDINARY_URL | cut -d'@' -f2)"
- name: π§° Install gotestsum
run: go install gotest.tools/gotestsum@v1.11.0
- name: π§ͺ Run Tests
run: |
gotestsum --junitfile unit-tests.xml --format pkgname ./...
- name: π Test Summary
uses: test-summary/action@v2
with:
paths: "unit-tests.xml"
if: always()