Skip to content

Commit

Permalink
github workflow additions/updates
Browse files Browse the repository at this point in the history
main addition is to run go-apidiff on all PRs

also added go module caching, which should speed
up tests and builds
  • Loading branch information
joelanford committed Jan 18, 2023
1 parent 081c4b0 commit afbdb0a
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 4 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,22 @@ jobs:
e2e-kind:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- uses: actions/checkout@v3

- uses: actions/setup-go@v3
with:
go-version-file: "go.mod"
go-version-file: go.mod

- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run e2e tests
run: |
make e2e
25 changes: 25 additions & 0 deletions .github/workflows/go-apidiff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: go-apidiff
on: [ pull_request ]
jobs:
go-apidiff:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-go@v3
with:
go-version-file: go-version-file

- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: joelanford/go-apidiff@main
16 changes: 14 additions & 2 deletions .github/workflows/unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,22 @@ jobs:
unit-test-basic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- uses: actions/checkout@v3

- uses: actions/setup-go@v3
with:
go-version-file: "go.mod"
go-version-file: go.mod

- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run basic unit tests
run: |
make test

0 comments on commit afbdb0a

Please sign in to comment.