chore: add a site description #112
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: push | |
permissions: read-all | |
on: [push, pull_request] | |
env: | |
NODE_VERSION: "18" | |
PNPM_VERSION: "8.5.1" | |
GO_VERSION: "1.21.0" | |
jobs: | |
lint-backend: | |
name: Lint Backend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
stable: false | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Lint | |
uses: golangci/golangci-lint-action@v2 | |
with: | |
skip-pkg-cache: true | |
skip-build-cache: true | |
args: --timeout 5m | |
lint-frontend: | |
name: Lint Frontend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup nodejs | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Install pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: ${{ env.PNPM_VERSION }} | |
run_install: | | |
- cwd: frontend | |
- name: Lint | |
working-directory: ./frontend | |
run: pnpm run lint | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
stable: false | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Test | |
run: go test -v ./... | |
build-backend: | |
name: Build Backend | |
runs-on: ubuntu-latest | |
needs: | |
- lint-backend | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
stable: false | |
- name: Check out | |
uses: actions/checkout@v2 | |
- name: Build wasm | |
run: go build -ldflags="-s -w" -v -o build.wasm ./wasm | |
env: | |
GOOS: js | |
GOARCH: wasm | |
build-frontend: | |
name: Build Frontend | |
runs-on: ubuntu-latest | |
needs: | |
- lint-frontend | |
steps: | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Check out | |
uses: actions/checkout@v2 | |
- name: Install pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: ${{ env.PNPM_VERSION }} | |
run_install: | | |
- cwd: frontend | |
- name: Build frontend | |
working-directory: frontend | |
run: pnpm run build |