-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (41 loc) · 1.03 KB
/
ci.yaml
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
name: Run CI Tests
on: [push]
env:
PLEDGE_VERSION: pledge-1.8.com
PLEDGE_PATH: /opt/bin/pledge-1.8.com
jobs:
lint:
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-golang@v1
with:
version-file: go.mod
- uses: golangci/golangci-lint-action@v3
with:
version: v1.55.2
skip-cache: true
run-tests:
strategy:
fail-fast: true
matrix:
os: [ubuntu-22.04]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-golang@v1
with:
version-file: go.mod
- name: Run Go Vet
run: |
make vet
- name: Install Pledge
run: |
mkdir /opt/bin
curl -L -o ${PLEDGE_PATH} https://github.com/shoenig/nomad-pledge-driver/releases/download/${PLEDGE_VERSION}/${PLEDGE_VERSION}
chmod +x ${PLEDGE_PATH}
ls -lha ${PLEDGE_PATH}
- name: Run Go Test
run: |
make test