-
Notifications
You must be signed in to change notification settings - Fork 3
87 lines (80 loc) · 1.99 KB
/
ci.yml
File metadata and controls
87 lines (80 loc) · 1.99 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: CI
on:
push:
branches: [main]
paths-ignore:
- '**.md'
- 'docs/**'
- '.gitignore'
pull_request:
branches: [main]
paths-ignore:
- '**.md'
- 'docs/**'
- '.gitignore'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
conventional-commits:
name: Conventional Commits Check
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Conventional Commits
uses: webiny/action-conventional-commits@v1.3.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
allowed-commit-types: "feat,fix,cicd,chore,patch,release,test,docs,refactor,ci,dev,test"
lint:
name: Lint
runs-on: ubuntu-latest
needs: conventional-commits
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-go@v5
with:
go-version: '1.25.3'
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: latest
args: --timeout=5m
skip-cache: true
skip-save-cache: true
test:
name: Test
runs-on: ubuntu-latest
needs: lint
timeout-minutes: 10
# services:
# cassandra:
# image: cassandra:5 # Use a specific version if needed
# ports:
# - 9042:9042
# options: >-
# --hostname cassandra
# --health-cmd "cqlsh --debug -e 'DESCRIBE KEYSPACES' || exit 1"
# --health-interval 10s
# --health-timeout 5s
# --health-retries 7
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-go@v5
with:
go-version: '1.25.3'
cache: true
- name: Run tests
run: go test -v -cover ./...
# env:
# CASSANDRA_HOSTS: "localhost"
# CASSANDRA_KEYSPACE: "testkeyspace"