Skip to content

Commit cf2d6ed

Browse files
committed
Test repository using GitHub actions
1 parent 83409fd commit cf2d6ed

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.github/workflows/ci.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: CI
2+
3+
on: ["push", "release"]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
test:
11+
name: "Run tests and lint artifacts"
12+
secrets: inherit
13+
strategy:
14+
fail-fast: false # Run the whole matrix for maximum information. No matter if we fail with one job early.
15+
matrix:
16+
os:
17+
- "ubuntu-latest"
18+
uses: ./.github/workflows/job-test.yml
19+
with:
20+
os: ${{ matrix.os }}

.github/workflows/job-test.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
on:
2+
workflow_call:
3+
inputs:
4+
os:
5+
required: true
6+
type: string
7+
8+
jobs:
9+
test:
10+
runs-on: ${{ inputs.os }}
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: jlumbroso/free-disk-space@main
15+
if: contains(inputs.os, 'ubuntu')
16+
17+
- name: Set up Go
18+
uses: actions/setup-go@v5
19+
with:
20+
go-version: "1.23.6"
21+
22+
- name: Set up Git
23+
run: |
24+
git config --global user.name "GitHub Actions Bot"
25+
git config --global user.email "<>"
26+
shell: bash # Explicitly use Bash because otherwise failing Windows jobs are not erroring.
27+
28+
- name: Test
29+
run: go test ./...
30+
shell: bash # Explicitly use Bash because otherwise failing Windows jobs are not erroring.

0 commit comments

Comments
 (0)