Skip to content

fix(ci): fix ci

fix(ci): fix ci #8

Workflow file for this run

name: Test
on:
push:
branches:
- main
- develop
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
- ".github/workflows/test.yml"
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
- develop
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
- ".github/workflows/test.yml"
permissions:
contents: read
jobs:
test:
strategy:
fail-fast: false
matrix:
go-version: ['1.20']
runs-on: ubuntu-latest
services:
memcached:
image: memcached:latest
ports:
- 11211:11211
ssdb:
image: tsl0922/ssdb
env:
SSDB_PORT: 8888
ports:
- "8888:8888"
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: orm_test
ports:
- 5432/tcp
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout codebase
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "run go build"
run: go build -v ./...
- name: "run go test and out codecov"
run: go test -v ./... -race -coverprofile=coverage.out -covermode=atomic
- name: Upload codecov
env:
CODECOV_TOKEN: 4f4bc484-32a8-43b7-9f48-20966bd48ceb
run: bash <(curl -s https://codecov.io/bash)