forked from datacharmer/dbdeployer
-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (63 loc) · 1.68 KB
/
all_tests.yml
File metadata and controls
67 lines (63 loc) · 1.68 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
59
60
61
62
63
64
65
66
67
name: CI
on: [push, pull_request]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
- name: govulncheck (informational)
continue-on-error: true
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
- name: Copyright check
run: ./scripts/sanity_check.sh copyright
test:
name: Test (Go ${{ matrix.go-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
go-version: ['1.22', '1.23']
os: [ubuntu-latest, macos-latest]
env:
GO111MODULE: on
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Install libraries (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libncurses6 libaio1t64 libnuma1 bash-completion
- name: Unit tests
run: ./test/go-unit-tests.sh
build:
name: Build
runs-on: ubuntu-latest
needs: [lint, test]
env:
GO111MODULE: on
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Build
run: ./scripts/build.sh linux
- name: Verify executable
run: |
version=$(cat common/VERSION)
test -f "dbdeployer-${version}.linux" || exit 1