-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.69 KB
/
ci.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: CI
on:
push:
branches: ["main"]
paths-ignore: ["*.md", "docs", "deploy", "config", ".github", "scripts"]
pull_request:
branches: ["main"]
paths-ignore: ["*.md", "docs", "deploy", "config", ".github", "scripts"]
jobs:
build-test:
runs-on: ubuntu-latest
if: |
contains(github.event.commits[0].message, '[skip ci]') == false &&
contains(github.event.commits[0].message, '[ci skip]') == false
steps:
- uses: actions/checkout@v3
# https://github.com/actions/setup-go/issues/326
# https://github.com/testcontainers/testcontainers-go/issues/1359
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.22.x
id: go
- name: Cache go modules
id: cache
uses: actions/cache@preview
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: make install-dependencies
# https://pkg.go.dev/cmd/go#hdr-Compile_packages_and_dependencies
# https://pkg.go.dev/cmd/go#hdr-Package_lists_and_patterns
- name: Build
run: make build
# https://go.dev/doc/articles/race_detector
# https://dev.to/s0xzwasd/run-tests-with-race-flag-in-goland-512j
- name: Unit Tests
run:
make unit-test
# there are some problem with test-container library in the github-actions!! locally all tests will pass
- name: Integration Tests
run: make integration-test
- name: End-To-End Tests
run: make e2e-test