-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (39 loc) · 1.31 KB
/
ci.yml
File metadata and controls
40 lines (39 loc) · 1.31 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
GOPRIVATE: github.com/GoCodeAlone/*
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Configure Git for private repos
if: ${{ secrets.RELEASES_TOKEN != '' }}
run: git config --global url."https://x-access-token:${{ secrets.RELEASES_TOKEN }}@github.com/".insteadOf "https://github.com/"
- run: go test -race ./...
- run: go vet ./...
strict-contracts:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Configure Git for private repos
if: ${{ secrets.RELEASES_TOKEN != '' }}
run: git config --global url."https://x-access-token:${{ secrets.RELEASES_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Validate strict plugin contracts
run: |
WFCTL_VERSION=$(go list -m -f '{{.Version}}' github.com/GoCodeAlone/workflow)
go run github.com/GoCodeAlone/workflow/cmd/wfctl@${WFCTL_VERSION} plugin validate --file plugin.json --strict-contracts