Skip to content

Distrolessイメージへの乗り換え #3054

Distrolessイメージへの乗り換え

Distrolessイメージへの乗り換え #3054

Workflow file for this run

name: CI
on:
push:
branches:
- 'master'
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "./go.mod"
- run: go mod download
- run: make traQ
- uses: actions/upload-artifact@v3
with:
name: traQ
path: traQ
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "./go.mod"
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: '--timeout 3m0s'
test:
name: Test
runs-on: ubuntu-latest
needs: [build]
services:
mysql:
image: mariadb:10.6.4
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
env:
MYSQL_ROOT_PASSWORD: password
ports:
- 3306:3306
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "./go.mod"
- name: Run tests
run: |
export TRAQ_IMAGEMAGICK=`which convert`
go test ./... -coverprofile=coverage.txt -race -shuffle=on -vet=off
env:
MARIADB_HOSTNAME: 127.0.0.1
MARIADB_PORT: 3306
MARIADB_USERNAME: root
MARIADB_PASSWORD: password
- name: Upload coverage data
uses: codecov/codecov-action@v3
with:
files: ./coverage.txt
tbls:
name: TBLS
runs-on: ubuntu-latest
needs: [build]
services:
mysql:
image: mariadb:10.6.4
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: traq
ports:
- 3306:3306
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: traQ
- uses: k1low/setup-tbls@v1
with:
version: v1.65.3
- run: |
chmod +x ./traQ
./traQ migrate --reset
tbls lint
env:
TRAQ_MARIADB_HOST: 127.0.0.1
TRAQ_MARIADB_PORT: 3306
TRAQ_MARIADB_USERNAME: root
TRAQ_MARIADB_PASSWORD: password
TRAQ_MARIADB_DATABASE: traq
TBLS_DSN: 'mariadb://root:password@127.0.0.1:3306/traq'