Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
boreq committed Jun 20, 2023
1 parent 92ecbee commit 4d78c1a
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
- 'feature/**'

jobs:

ci:
name: Run CI
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.19', '1.20' ]
steps:

- name: Checkout
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: Determine Go cache paths
id: golang-path
run: |
echo "build=$(go env GOCACHE)" >>"$GITHUB_OUTPUT"
echo "module=$(go env GOMODCACHE)" >>"$GITHUB_OUTPUT"
shell: bash

- name: Setup Go cache
uses: actions/cache@v3
with:
path: |
${{ steps.golang-path.outputs.build }}
${{ steps.golang-path.outputs.module }}
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum', 'Makefile') }}
restore-keys: |
${{ runner.os }}-golang-
- name: Run tests
run: make ci

0 comments on commit 4d78c1a

Please sign in to comment.