-
Notifications
You must be signed in to change notification settings - Fork 207
39 lines (32 loc) · 1.07 KB
/
test.yml
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
name: Tests
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
name: "Unit Tests"
runs-on: ubuntu-latest
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: "true" # workflow-runs from outdated commits will be cancelled.
concurrent_skipping: "same_content"
skip_after_successful_duplicate: "true"
paths: '["**/*.go", "**/*.mod", "**/*.sum"]'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
- name: Skipping test
run: echo Should I skip tests? ${{ steps.skip_check.outputs.should_skip }}
- name: Check out repository code
if: steps.skip_check.outputs.should_skip != 'true'
uses: actions/checkout@v3
- name: Setup Golang
if: steps.skip_check.outputs.should_skip != 'true'
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Run all unit tests
if: steps.skip_check.outputs.should_skip != 'true'
run: make test-unit