ci(deps): bump golangci/golangci-lint-action from 3 to 4 #113
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 and test | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- "main" | |
paths-ignore: | |
- ".gitignore" | |
- ".hadolint.yaml" | |
- ".pre-commit-config.yaml" | |
- ".yamllint.yaml" | |
- "LICENSE" | |
- "Makefile" | |
- "README.md" | |
jobs: | |
unit_test: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.19 | |
- name: Launch the unit tests | |
run: go test | |
# Integration test disabled due to a GitHub action bug randomly | |
# not able to fetch the secret value and returning null. | |
# See https://github.com/orgs/community/discussions/25701#discussioncomment-3248811 | |
# integration_test: | |
# name: Integration test | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# | |
# - name: Test the action | |
# uses: ./ | |
# with: | |
# package: terraform-graph-beautifier | |
# repository: pcasteran/terraform-graph-beautifier | |
# password: ${{ secrets.MY_SECRET_PAT }} | |
# debug: true | |
# dry-run: true | |
##### | |
build_docker_image: | |
name: Build the Docker image | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- id: build_image | |
name: Build the Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
tags: ${{ github.repository }} | |
load: true | |
- name: Analyze the image efficiency | |
run: | | |
docker run --rm \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
wagoodman/dive:latest \ | |
--ci \ | |
--lowestEfficiency=0.95 \ | |
--highestUserWastedPercent=0.05 \ | |
${{ github.repository }} |