Skip to content

Commit

Permalink
Switch to reusable workflow for running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hansmi committed Dec 25, 2022
1 parent b408ebe commit a38de61
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 36 deletions.
11 changes: 11 additions & 0 deletions .github/ghactions-go-test-extra/01-endtoend
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -e -u -o pipefail

sudo apt-get --no-install-recommends --yes install watchman

go build

go test -v -tags endtoend ./endtoend/... -- "${PWD}/baamhackl"

# vim: set sw=2 sts=2 et :
41 changes: 5 additions & 36 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,15 @@ on:
pull_request:
push:
schedule:
- cron: '25 15 */9 * *'
- cron: '25 15 */9 * *'

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: hansmi/ghactions-go-test-workflow/.github/workflows/test.yaml@stable
with:
runs-on: ubuntu-latest

- name: Go setup
uses: actions/setup-go@v3
with:
go-version: 1

- uses: actions/cache@v3
with:
# https://github.com/actions/cache/blob/main/examples.md#go---modules
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Dependencies
run: go get -v

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...

- name: End-to-end test
run: |
sudo apt-get --no-install-recommends --yes install watchman && \
go build && \
go test -v -tags endtoend ./endtoend/... -- "${PWD}/baamhackl"
# vim: set sw=2 sts=2 et : -->
# vim: set sw=2 sts=2 et :

0 comments on commit a38de61

Please sign in to comment.