mirror of
https://github.com/dstotijn/hetty.git
synced 2025-07-01 18:47:29 -04:00
Add build-test
Github Action
This commit is contained in:
52
.github/workflows/build-test.yml
vendored
Normal file
52
.github/workflows/build-test.yml
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
name: Build and Test
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
go: ["1.17", "1.16"]
|
||||||
|
name: Go ${{ matrix.go }} - Build
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go }}
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: "14"
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cache/go-build
|
||||||
|
~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ github.workspace }}/admin/.next/cache
|
||||||
|
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
|
||||||
|
- run: make build
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
go: ["1.17", "1.16"]
|
||||||
|
name: Go ${{ matrix.go }} - Test
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go }}
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cache/go-build
|
||||||
|
~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
|
- run: go test ./pkg/...
|
@ -5,6 +5,7 @@
|
|||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
[](https://github.com/dstotijn/hetty/releases/latest)
|
[](https://github.com/dstotijn/hetty/releases/latest)
|
||||||
|
[](https://github.com/dstotijn/hetty/actions/workflows/build-test.yml)
|
||||||

|

|
||||||
[](https://github.com/dstotijn/hetty/blob/master/LICENSE)
|
[](https://github.com/dstotijn/hetty/blob/master/LICENSE)
|
||||||
[](https://hetty.xyz/)
|
[](https://hetty.xyz/)
|
||||||
|
Reference in New Issue
Block a user