2021-08-12 07:27:36 -07:00
|
|
|
name: ci
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
2021-09-14 02:04:40 -07:00
|
|
|
- name: Upgrade golang
|
|
|
|
run: |
|
|
|
|
cd /tmp
|
2022-10-06 07:39:19 -07:00
|
|
|
wget https://dl.google.com/go/go1.18.7.linux-amd64.tar.gz
|
|
|
|
tar -zxvf go1.18.7.linux-amd64.tar.gz
|
2021-09-14 02:04:40 -07:00
|
|
|
sudo rm -fr /usr/local/go
|
|
|
|
sudo mv /tmp/go /usr/local/go
|
|
|
|
cd -
|
|
|
|
ls -l /usr/bin/go
|
2021-11-25 06:15:36 -08:00
|
|
|
|
2021-08-12 07:27:36 -07:00
|
|
|
- name: Checkout Repo
|
|
|
|
uses: actions/checkout@v2
|
2021-11-25 06:15:36 -08:00
|
|
|
|
|
|
|
# This file would normally be created by `make assets`, here we just
|
|
|
|
# mock it because the file is required for the tests to pass.
|
|
|
|
- name: Mock building of necessary react file
|
|
|
|
run: mkdir web/ui/static/react && touch web/ui/static/react/index.html
|
|
|
|
|
2021-08-12 07:27:36 -07:00
|
|
|
- name: Run Tests
|
2021-09-14 02:04:40 -07:00
|
|
|
run: GO=/usr/local/go/bin/go make common-test
|