Skip to content

Bump github.com/go-co-op/gocron from 1.33.1 to 1.34.2 #300

Bump github.com/go-co-op/gocron from 1.33.1 to 1.34.2

Bump github.com/go-co-op/gocron from 1.33.1 to 1.34.2 #300

Workflow file for this run

name: build
on:
push:
branches: [ main ]
pull_request:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.20', '1.21' ]
steps:
- name: Checkout repository
id: checkout-repository
uses: actions/checkout@v3
- name: Install Go ${{ matrix.go-version }}
id: install-go
uses: actions/setup-go@v3
- name: Run golangci-lint
id: run-golangci-lint
uses: golangci/golangci-lint-action@v3.5.0
build-server:
name: Build and test server
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.20', '1.21' ]
needs:
- lint
steps:
- name: Checkout repository
id: checkout-repository
uses: actions/checkout@v3
- name: Cache go modules
id: cache-go-modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Install Go ${{ matrix.go-version }}
id: install-go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Download go modules
id: download-go-modules
run: go mod download
- name: Build server
id: build-server
run: go build ./cmd/server
- name: Test server
id: test-server
run: go test ./cmd/server/... ./src/server/...
build-client:
name: Build and test client
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.20', '1.21' ]
node-version: [ '18', '20' ]
needs:
- lint
steps:
- name: Checkout repository
id: checkout-repository
uses: actions/checkout@v3
- name: Cache go modules
id: cache-go-modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Install Go ${{ matrix.go-version }}
id: install-go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Install Node ${{ matrix.node-version }}
id: install-node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install node modules
id: install-node-modules
uses: bahmutov/npm-install@v1
with:
working-directory: ui
- name: Build UI
id: build-ui
run: npm --prefix ui run build
- name: Copy UI
id: copy-ui
run: cp -r static cmd/client
- name: Build client
id: build-client
run: go build ./cmd/client
- name: Test client
id: test-client
run: go test ./cmd/client/... ./src/client/...
test:
name: Run integration & package unit tests
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.20', '1.21' ]
mongodb-version: ['5.0', '6.0']
needs:
- build-server
- build-client
steps:
- name: Checkout repository
id: checkout-repository
uses: actions/checkout@v3
- name: Cache go modules
id: cache-go-modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Install Go ${{ matrix.go-version }}
id: install-go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Start MongoDB
id: start-mongodb
uses: supercharge/mongodb-github-action@1.8.0
with:
mongodb-version: ${{ matrix.mongodb-version }}
mongodb-db: 'myst'
- name: Run tests
id: run-tests
run: go test ./test/... ./pkg/...