2022-08-31 05:54:02 +00:00
|
|
|
name: "Unit and Build Tests"
|
2021-04-22 19:50:52 +00:00
|
|
|
|
|
|
|
on:
|
2022-08-31 05:54:02 +00:00
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
2021-04-22 19:50:52 +00:00
|
|
|
|
|
|
|
jobs:
|
2022-09-01 21:07:37 +00:00
|
|
|
bundle-up-to-date:
|
|
|
|
runs-on: "ubuntu-latest"
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-go@v3
|
|
|
|
with:
|
|
|
|
go-version: 1.19
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
- run: "make clean"
|
|
|
|
- run: "make assets"
|
|
|
|
- name: "Make sure gotty.js bundle is up-to-date"
|
|
|
|
run: "diffsize=$(git diff bindata/static/js/gotty.js | wc -l); test $diffsize == 0"
|
|
|
|
|
|
|
|
|
2022-08-31 05:54:02 +00:00
|
|
|
build-test:
|
|
|
|
runs-on: "ubuntu-latest"
|
2021-04-22 19:50:52 +00:00
|
|
|
|
|
|
|
steps:
|
2022-08-31 05:54:02 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-04-22 19:50:52 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set up Go
|
2022-08-31 05:54:02 +00:00
|
|
|
uses: actions/setup-go@v3
|
2021-04-22 19:50:52 +00:00
|
|
|
with:
|
2022-08-31 05:54:02 +00:00
|
|
|
go-version: 1.19
|
2021-04-22 19:50:52 +00:00
|
|
|
|
2022-08-31 05:54:02 +00:00
|
|
|
- name: "Build & test"
|
|
|
|
run: "make tools test cross_compile"
|
2021-04-22 19:50:52 +00:00
|
|
|
|
2022-08-31 05:54:02 +00:00
|
|
|
- name: Upload build artifacts
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: binaries
|
|
|
|
path: builds/pkg/*/gotty
|