-
Notifications
You must be signed in to change notification settings - Fork 29
68 lines (67 loc) · 1.99 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Generated by ci_tool.cue; do not edit
name: Test
"on":
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- '**'
schedule:
- cron: 0 9 * * *
env:
DOCKER_HUB_USER: playwithgopher
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
PLAYWITHGODEV_CONTRIBUTOR_USER: playwithgopher_github
PLAYWITHGODEV_CONTRIBUTOR_PASSWORD: ${{ secrets.PLAYWITHGODEV_CONTRIBUTOR_PASSWORD }}
PLAYWITHGOPHER_GITHUB_PAT: ${{ secrets.PLAYWITHGOPHER_GITHUB_PAT }}
jobs:
test:
strategy:
fail-fast: false
matrix:
go_version:
- 1.19.1
os:
- ubuntu-20.04
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go_version }}
- name: Pre-download specific modules
run: go mod download github.com/play-with-go/preguide github.com/play-with-go/gitea
- name: mac CI setup
run: ./_scripts/macCISetup.sh
if: ${{ matrix.os == 'macos-latest' }}
- name: Ensure docker setup
run: ./_scripts/ensureDocker.sh
- name: Env setup
run: ./_scripts/env.sh github
- name: Verify
run: go mod verify
- name: Tidy
run: go mod tidy
- name: Run unity tests
run: go run github.com/cue-sh/unity/cmd/unity test
- name: docker-compose build
run: ./_scripts/dc.sh build
- name: Start gitea services
run: ./_scripts/dc.sh up -d cmd_gitea
- name: Re-generate guides
run: _scripts/generateGuides.sh
env:
CGO_ENABLED: "0"
PREGUIDE_SKIP_CACHE: "true"
PREGUIDE_PROGRESS: "true"
- name: Re-generate everything else
run: _scripts/generateEverythingElse.sh
- name: Verify commit is clean
run: test -z "$(git status --porcelain)" || (git status; git diff; false)
- name: Publish site
run: _scripts/publishSite.sh