Skip to content

Merge pull request #260 from douyu/dependabot/github_actions/actions/… #699

Merge pull request #260 from douyu/dependabot/github_actions/actions/…

Merge pull request #260 from douyu/dependabot/github_actions/actions/… #699

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/checkout@v4
- 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 mod tidy -v
- name: Build
run: |
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