-
Notifications
You must be signed in to change notification settings - Fork 9
39 lines (36 loc) · 1.06 KB
/
examples.yml
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
name: Examples
on:
pull_request:
paths:
- ".github/workflows/examples.yml"
- "**.go"
- "go.mod"
- "go.sum"
- "examples/**.md"
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}
cancel-in-progress: false
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout head
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: "go.mod"
- name: Install mdtest and upctl
run: |
go install github.com/UpCloudLtd/mdtest@latest
make build
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- name: Test examples
env:
UPCLOUD_USERNAME: ${{ secrets.UPCLOUD_USERNAME }}
UPCLOUD_PASSWORD: ${{ secrets.UPCLOUD_PASSWORD }}
run: |
upctl version
upctl account show > /dev/null # Ensure that credentials are valid
mdtest examples/