Skip to content

Commit 71ba916

Browse files
committed
Improve CI workflow
1 parent 9f7723c commit 71ba916

File tree

2 files changed

+35
-11
lines changed

2 files changed

+35
-11
lines changed

.github/workflows/ci.yml

+33-11
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,45 @@ on:
55
branches: [master, develop]
66
pull_request:
77
branches: [master]
8+
workflow_dispatch:
9+
inputs:
10+
force_run:
11+
description: 'Force workflow run'
12+
required: true
13+
type: choice
14+
options: [yes, no]
15+
16+
permissions:
17+
actions: read
18+
contents: read
19+
statuses: write
20+
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.ref }}
23+
cancel-in-progress: true
824

925
jobs:
1026
Go:
1127
name: Go
1228
runs-on: ubuntu-latest
1329

14-
env:
15-
SRC_DIR: src/github.com/${{ github.repository }}
16-
1730
strategy:
1831
matrix:
19-
go: [ '1.18.x', '1.19.x' ]
32+
go: [ '1.19.x', '1.20.x' ]
2033

2134
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v3
37+
2238
- name: Set up Go
2339
uses: actions/setup-go@v4
2440
with:
2541
go-version: ${{ matrix.go }}
2642

27-
- name: Checkout
28-
uses: actions/checkout@v3
29-
with:
30-
path: ${{env.SRC_DIR}}
31-
3243
- name: Download dependencies
33-
working-directory: ${{env.SRC_DIR}}
3444
run: make deps
3545

3646
- name: Run tests
37-
working-directory: ${{env.SRC_DIR}}
3847
run: make all
3948

4049
Perfecto:
@@ -58,3 +67,16 @@ jobs:
5867
uses: essentialkaos/perfecto-action@v2
5968
with:
6069
files: common/jira-reindex-runner.spec
70+
71+
Typos:
72+
name: Typos
73+
runs-on: ubuntu-latest
74+
75+
needs: Go
76+
77+
steps:
78+
- name: Checkout
79+
uses: actions/checkout@v3
80+
81+
- name: Check spelling
82+
uses: crate-ci/typos@master

.typos.toml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[files]
2+
extend-exclude = ["go.sum"]

0 commit comments

Comments
 (0)