Skip to content

Commit d73027b

Browse files
committed
use GitHub actions instead of CircleCI
1 parent 1572fb5 commit d73027b

File tree

3 files changed

+81
-73
lines changed

3 files changed

+81
-73
lines changed

.circleci/config.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.

.github/workflows/ci.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: ci
2+
on:
3+
push:
4+
branches: [main]
5+
tags: ['v*']
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
- cron: '35 5 * * 2' # Tuesdays, 5:35am
10+
workflow_dispatch: {} # support manual runs
11+
permissions:
12+
contents: read
13+
jobs:
14+
ci:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
go-version: [1.19.x,1.20.x,1.21.x]
19+
steps:
20+
- name: Checkout Code
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 1
24+
- name: Install Go
25+
uses: actions/setup-go@v5
26+
with:
27+
go-version: ${{ matrix.go-version }}
28+
- name: Cache
29+
uses: actions/cache@v4
30+
with:
31+
path: ~/go/pkg/mod
32+
key: ${{ runner.os }}-grpctunnel-ci-${{ hashFiles('**/go.sum') }}
33+
restore-keys: ${{ runner.os }}-grpctunnel-ci-
34+
- name: Run tests
35+
if: matrix.go-version != '1.21.x' # run fast test step for older versions of Go
36+
run: make deps test
37+
- name: Run Tests and Lint
38+
if: matrix.go-version == '1.21.x' # only run linters for latest version of Go
39+
run: make ci
40+
- name: Run Tests against Latest Deps
41+
if: matrix.go-version == '1.21.x' # only update deps with latest version of Go
42+
run: go get -u ./... && make deps test

.github/workflows/windows.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: windows
2+
on:
3+
push:
4+
branches: [main]
5+
tags: ['v*']
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
- cron: '35 5 * * 2' # Tuesdays, 5:35am
10+
workflow_dispatch: {} # support manual runs
11+
permissions:
12+
contents: read
13+
jobs:
14+
ci:
15+
runs-on: windows-latest
16+
strategy:
17+
matrix:
18+
go-version: [1.19.x,1.20.x,1.21.x]
19+
steps:
20+
- name: Checkout Code
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 1
24+
- name: Install Go
25+
uses: actions/setup-go@v5
26+
with:
27+
go-version: ${{ matrix.go-version }}
28+
- id: go-cache-paths
29+
shell: bash
30+
run: |
31+
echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
32+
- name: Mod Cache
33+
uses: actions/cache@v4
34+
with:
35+
path: ${{ steps.go-cache-paths.outputs.go-mod }}
36+
key: ${{ runner.os }}-grpctunnel-ci-${{ hashFiles('**/go.sum') }}
37+
- name: Test
38+
shell: bash
39+
run: make deps test

0 commit comments

Comments
 (0)