Bump golang from 1.23.2-alpine to 1.23.3-alpine in /build #157
Workflow file for this run
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: Build | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
set-up: | |
name: Set-Up | |
runs-on: ubuntu-latest | |
if: ${{ startsWith(github.head_ref, 'feature') || startsWith(github.head_ref, 'fix') || startsWith(github.head_ref, 'dependabot') }} | |
defaults: | |
run: | |
shell: sh | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22.1 | |
- name: Install dependencies | |
run: go mod tidy | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
needs: | |
- set-up | |
defaults: | |
run: | |
shell: sh | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22.1 | |
- name: Linting | |
run: go fmt ./cmd/ | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
needs: | |
- lint | |
defaults: | |
run: | |
shell: sh | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22.1 | |
- name: Run Unit Tests | |
run: go test -v --race --covermode atomic --coverpkg github.com/unofficialopensource-knit/MailerService/internal/app ./internal/app_test/unit/ | |
env: | |
SMTP_IDENTITY: ${{ secrets.MAILER_SMTP_IDENTITY }} | |
SMTP_USERNAME: ${{ secrets.MAILER_SMTP_USERNAME }} | |
SMTP_PASSWORD: ${{ secrets.MAILER_SMTP_PASSWORD }} | |
SMTP_HOST: ${{ vars.MAILER_SMTP_HOST }} | |
SMTP_PORT: ${{ vars.MAILER_SMTP_PORT }} | |
CONTACT_US_DEFAULT_RECIPIENT: ${{ vars.MAILER_CONTACT_US_DEFAULT_RECIPIENT }} | |
- name: Upload coverage to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: unofficialopensource-knit/MailerService | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
needs: | |
- test | |
defaults: | |
run: | |
shell: sh | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22.1 | |
- name: Build | |
run: go build -tags jsoniter -o bin/mailer cmd/main.go |