Skip to content

ci: bump golangci/golangci-lint-action from 4 to 5 in the deps group #230

ci: bump golangci/golangci-lint-action from 4 to 5 in the deps group

ci: bump golangci/golangci-lint-action from 4 to 5 in the deps group #230

Workflow file for this run

---
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
tests:
name: tests
runs-on: ubuntu-latest
services:
db:
image: postgres:14
env:
POSTGRES_PASSWORD: pwd
POSTGRES_USER: memoriesbox
ports:
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: migrate
env:
POSTGRESQL_URL: postgres://memoriesbox:pwd@localhost:5432/memoriesbox?sslmode=disable&connect_timeout=10
run: |
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
make db-migrate-up
- name: test
env:
# Functionnal tests
MEMORIESBOX_TEST_DB_USER: memoriesbox
MEMORIESBOX_TEST_DB_NAME: memoriesbox
MEMORIESBOX_TEST_DB_PASS: pwd
# SQLBoiler
PSQL_PASS: pwd
run: |
make go-tests
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: "^1.20"
- name: Build
run: |
CGO_ENABLED=0 go build -ldflags="-s -w" -installsuffix nocgo -o bin/memoriesbox cmd/webapp/main.go