Skip to content

Merge pull request #247 from douyu/dependabot/go_modules/gorm.io/gorm… #674

Merge pull request #247 from douyu/dependabot/go_modules/gorm.io/gorm…

Merge pull request #247 from douyu/dependabot/go_modules/gorm.io/gorm… #674

Workflow file for this run

name: Go
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
go: ["1.19.x"]
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
id: go
- name: Check out code into the Go module directory
uses: actions/[email protected]
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: docker-compose
run: docker-compose -f tests/e2e/docker-compose.yml up -d
- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-
- name: Get dependencies
run: |
go env
go get -v -t -d ./...
- name: Build
run: |
make init
make generate
- name: Test
run: |
make test
make e2e-test
- name: Codecov
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
files: ./coverage.txt, ./tests/e2e/coverage.txt