-
Notifications
You must be signed in to change notification settings - Fork 1.7k
41 lines (38 loc) · 1.18 KB
/
ci-scripts.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
39
40
41
name: CI Scripts
on:
merge_group:
pull_request:
jobs:
lint-scripts:
# We don't directly merge dependabot PRs, so let's not waste the resources
if: ${{ (github.event_name == 'pull_request' || github.event_name == 'schedule') && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
permissions:
# For golangci-lint-actions to annotate code in the PR.
checks: write
contents: read
# For golangci-lint-action's `only-new-issues` option.
pull-requests: read
steps:
- uses: actions/[email protected]
- name: Golang Lint
uses: ./.github/actions/golangci-lint
with:
id: scripts
name: lint-scripts
go-directory: core/scripts
go-version-file: core/scripts/go.mod
go-module-file: core/scripts/go.sum
test-scripts:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup Go
uses: ./.github/actions/setup-go
with:
go-version-file: core/scripts/go.mod
go-module-file: core/scripts/go.sum
- name: Run Tests
shell: bash
working-directory: core/scripts
run: go test ./...