Skip to content

Commit

Permalink
Added GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu Vachon committed Oct 16, 2021
1 parent 12388aa commit 772b30b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and Test

on:
push:
branches:
- develop
pull_request:
branches:
- "**"

jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.15.x, 1.16.x, 1.17.x]
os: [ubuntu-latest, macos-latest]
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: Check out code
uses: actions/checkout@v2

- name: Cache Go modules
uses: actions/cache@v2
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run Tests
run: go test ./...

- name: Build
run: go build ./...
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.envrc
.idea
.DS_Store
.vscode

0 comments on commit 772b30b

Please sign in to comment.