-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (32 loc) · 960 Bytes
/
main.yml
File metadata and controls
35 lines (32 loc) · 960 Bytes
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
name: CI/CD for the jsonapi
on:
push:
pull_request:
branches:
- 'main'
jobs:
# This job uses skip-duplicate-actions to skip one of the duplicate workflow runs when you push to a branch with an open PR.
check_duplicate_workflow:
needs: []
runs-on: ubuntu-20.04
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v3.4.1
with:
skip_after_successful_duplicate: 'true'
concurrent_skipping: 'same_content_newer'
do_not_skip: '["push"]'
test:
needs: [check_duplicate_workflow]
runs-on: ubuntu-20.04
container: golang:1.16.15
if: ${{ needs.check_duplicate_workflow.outputs.should_skip != 'true' }}
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Run tests
run: |
go get -v -t -d ./...
go test -v ./...