Skip to content

pixel: init

pixel: init #232

Workflow file for this run

name: Go
on:
push:
paths:
- '**.go'
pull_request:
paths:
- '**.go'
env:
GOPROXY: "https://proxy.golang.org"
jobs:
test:
name: Test
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0.21
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: nekobox
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.20.x
- name: Run tests
run: go test -v -race -coverprofile=coverage.txt -race -covermode=atomic ./...
env:
DB_HOST: localhost
DB_PORT: 3306
DB_USER: root
DB_PASSWORD: root
DB_DATABASE: nekobox
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.20.x
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.53
args: --timeout=10m