fix(deps): update module github.com/minio/minio-go/v7 to v7.0.80 #346
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CI" | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- '' | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: aweme | |
MYSQL_USER: aweme | |
MYSQL_PASSWORD: aweme | |
ports: | |
- 3306:3306 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.19 | |
- name: Code Generation | |
run: | | |
MOCKERY=1 sh ./scripts/codegen.sh | |
- name: Go Code Test | |
run: | | |
go mod tidy | |
go test ./... -race -coverprofile=coverage.txt -covermode=atomic | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
files: coverage.txt | |
- name: Go Build | |
run: | | |
go build -ldflags="-w -s" -o app cmd/aweme/main.go | |
container: | |
runs-on: ubuntu-latest | |
needs: [ test ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.19 | |
- name: Code Generation | |
run: | | |
sh ./scripts/codegen.sh | |
- name: Login to DockerHub | |
if: github.ref == 'refs/heads/main' | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./scripts/Dockerfile | |
push: ${{ github.ref == 'refs/heads/main' }} | |
tags: ${{ secrets.DOCKERHUB_USERNAME || 'aweme' }}/aweme:latest |