Skip to content

fix(deps): update module github.com/labstack/echo/v4 to v4.13.3 #42

fix(deps): update module github.com/labstack/echo/v4 to v4.13.3

fix(deps): update module github.com/labstack/echo/v4 to v4.13.3 #42

Workflow file for this run

#
# Copyright (c) 2023-2024 sixwaaaay.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Users
on:
push:
branches:
- main
paths:
- 'cmd/shauser/**'
pull_request:
paths:
- 'cmd/shauser/**'
jobs:
test:
name: Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: cmd/shauser
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Docker Compose
run: |
docker compose up -d
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Install dependencies
run: |
go mod tidy
- name: Run tests
run: |
go test -v ./... -coverprofile=coverage.txt -covermode=atomic
env:
MYSQL_DSN: "mysql_user:mysql@tcp(localhost:3306)/users?charset=utf8mb4&parseTime=True&loc=Local&allowNativePasswords=true"
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
file: ./cmd/shauser/coverage.txt
flags: users
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
image-release:
name: Release Image
runs-on: ubuntu-latest
needs:
- test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./cmd/shauser
file: ./cmd/shauser/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME || 'shauser' }}/shauser:latest