-
Notifications
You must be signed in to change notification settings - Fork 6
77 lines (62 loc) · 2.08 KB
/
Copy pathci.yml
File metadata and controls
77 lines (62 loc) · 2.08 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_call:
inputs:
checkout-ref:
description: Git ref to check out when this workflow is called by another workflow.
required: false
type: string
default: ''
concurrency:
group: ci-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
ref: ${{ inputs.checkout-ref || github.ref }}
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
with:
go-version-file: 'go.mod'
- name: Check vendor is tidy
run: go mod vendor && git diff --exit-code vendor/
- name: golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8
with:
version: latest
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: '20'
- name: Install prettier
run: npm install --no-save prettier
- name: Check markdown formatting
run: |
npx prettier --check "**/*.md" || (echo "Please run 'npx prettier --write \"**/*.md\"' to format your markdown files" && exit 1)
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
ref: ${{ inputs.checkout-ref || github.ref }}
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
with:
go-version-file: 'go.mod'
- name: Run fast tests
run: go test -v -race ./internal/...
- name: Install podman
run: sudo apt-get update -qq && sudo apt-get install -y podman
- name: Report container runtime versions
run: |
containerd --version || true
docker --version || true
podman --version || true
- name: Run e2e tests
run: go test -v -timeout 5m ./e2e/...