databag/.github/workflows/go.yml

49 lines
819 B
YAML
Raw Normal View History

2022-07-01 22:04:44 +00:00
name: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
2022-09-02 04:09:40 +00:00
- name: Setup Node
2022-09-02 04:14:50 +00:00
uses: actions/setup-node@v3
with:
node-version: 16
- name: Build React
2022-09-02 04:09:40 +00:00
run: |
2022-09-02 04:18:20 +00:00
npm install --global yarn
2022-09-02 04:14:50 +00:00
cd net/web
yarn install
yarn build
2022-07-01 22:04:44 +00:00
2022-09-02 04:09:40 +00:00
- name: Setup Go
2022-07-01 22:04:44 +00:00
uses: actions/setup-go@v3
with:
go-version: 1.17.5
2022-09-02 04:14:50 +00:00
- name: Build Go
2022-07-01 22:07:30 +00:00
run: |
cd net/server
go build databag
2022-07-01 22:04:44 +00:00
- name: Test
2022-07-01 22:07:30 +00:00
run: |
cd net/server
go test -v ./...
2022-09-02 05:45:17 +00:00
- name: Export
uses: actions/upload-artifact@v2
with:
name: webapp
path: net/web/build/*