File tree Expand file tree Collapse file tree 1 file changed +33
-14
lines changed Expand file tree Collapse file tree 1 file changed +33
-14
lines changed Original file line number Diff line number Diff line change 1
- # name: CI
2
- # on: [push, pull_request]
3
- # jobs:
4
- # test:
5
- # runs-on: ubuntu-latest
6
- # steps:
7
- # - name: Checkout code
8
- # uses: actions/checkout@v4
9
- # - name: Set up Go
10
- # uses: actions/setup-go@v5
11
- # with:
12
- # go-version-file: go.mod
13
- # - name: Test
14
- # run: go test
1
+ name : Test Atlas Go SDK Code Examples
2
+
3
+ on :
4
+ pull_request_target :
5
+ types : [opened, synchronize]
6
+ paths :
7
+ - " usage-examples/go/atlas-sdk-go/**"
8
+
9
+ jobs :
10
+ build :
11
+
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Check access
15
+ if : ${{ github.event.pull_request.author_association != 'COLLABORATOR' }}
16
+ run : |
17
+ echo "Event not triggered by a collaborator."
18
+ exit 1
19
+ - uses : actions/checkout@v4
20
+ with :
21
+ ref : ${{ github.event.pull_request.head.sha }}
22
+ - name : Setup Go version based on go.mod version
23
+ uses : actions/setup-go@v5
24
+ with :
25
+ go-version-file : ' /usage-examples/go/atlas-sdk-go/go.mod'
26
+ - name : Install dependencies
27
+ run : |
28
+ cd go/
29
+ go mod download
30
+ - name : Run tests
31
+ run : |
32
+ cd usage-examples/go/atlas-sdk-go/
33
+ go test -v -p 1 ./internal/...
You can’t perform that action at this time.
0 commit comments