Skip to content
This repository has been archived by the owner on Dec 22, 2024. It is now read-only.

Bump github.com/golangci/golangci-lint from 1.59.1 to 1.62.2 #749

Bump github.com/golangci/golangci-lint from 1.59.1 to 1.62.2

Bump github.com/golangci/golangci-lint from 1.59.1 to 1.62.2 #749

Workflow file for this run

name: CI
on:
push:
paths-ignore:
- "**.md"
- "LICENSE"
jobs:
analyze:
strategy:
matrix:
os:
- ubuntu-latest
go-version:
- 1.22.5
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: false
check-latest: false
- name: Generate secrets
run: |
./scripts/bootstrap/key.sh
./scripts/bootstrap/keypair.sh
- uses: golangci/golangci-lint-action@v6
with:
version: latest
args: -v --timeout=5m --config=.golangci.yml
test:
needs:
- analyze
strategy:
matrix:
os:
- ubuntu-latest
go-version:
- 1.22.5
runs-on: ${{ matrix.os }}
steps:
# Setup
# --------------------------------------------------
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
check-latest: false
- uses: actions/cache@v4
with:
path: |
cache-go-build
cache-go-pkg
key: ${{ matrix.os }}-go${{ matrix.go-version }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ matrix.os }}-go${{ matrix.go-version }}-${{ github.job }}-
- name: Generate secrets
run: |
./scripts/bootstrap/key.sh
./scripts/bootstrap/keypair.sh
# Build images
# --------------------------------------------------
- uses: docker/setup-buildx-action@v3
- name: Inject cache-go-build into docker
uses: reproducible-containers/[email protected]
with:
cache-source: cache-go-build
cache-target: /root/.cache/go-build
- name: Inject cache-go-pkg into docker
uses: reproducible-containers/[email protected]
with:
cache-source: cache-go-pkg
cache-target: /go/pkg
- name: Build app-ci
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/app/Dockerfile
target: deploy
tags: go-oidc-expt-app-ci:dev
load: true
push: false
#- name: Build db
# uses: docker/build-push-action@v6
# with:
# context: .
# file: ./docker/db/Dockerfile
# tags: go-oidc-expt-db:dev
# load: true
# push: false
# Start datastore
# --------------------------------------------------
- name: Install atlas
run: curl -sSf https://atlasgo.sh | sh
- name: Start datastore
run: docker compose up -d cache db
- name: Wait for database to be available
run: scripts/docker/waiter/db.sh "db" "127.0.0.1" 13306 "root"
- name: Apply migrations
run: make migrate-apply SERVICE=db DATABASE=idp_test
# Start application
# --------------------------------------------------
- name: Start application
env:
CI_APP_BUILD_TARGET: deploy
run: docker compose up -d app-ci
# Run tests
# --------------------------------------------------
- name: Run all tests
run: make test
# Upload coverage
- name: Install goveralls
run: go install github.com/mattn/goveralls@latest
- name: Send coverage
run: goveralls -coverprofile=coverage.out -service=github
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
notify:
if: always()
needs:
- analyze
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Post CI status to Slack
run: |
.github/scripts/notifier/slack.sh
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
TEST_RESULT: ${{ needs.test.result }}
SLACK_BOT_USER_OAUTH_TOKEN: ${{ secrets.SLACK_BOT_USER_OAUTH_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
SLACK_USERNAME: ${{ secrets.SLACK_USERNAME }}