forked from exercism/go-test-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (51 loc) · 1.63 KB
/
test.yml
File metadata and controls
58 lines (51 loc) · 1.63 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
name: Run linter and tests
on: [push, pull_request, workflow_dispatch]
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- name: Install Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417
with:
go-version: 1.25.x
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Run linters
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9
with:
version: v2.5.0
test:
strategy:
matrix:
platform: [ubuntu-24.04, windows-2025]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
if: success()
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417
with:
go-version: 1.25.x
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Run tests
run: go test ./... -v
smoke-tests:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435
with:
install: true
- name: Build Docker image and store in cache
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
with:
context: .
push: false
load: true
tags: exercism/go-test-runner
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run Tests in Docker
run: bin/run-tests-in-docker.sh