Skip to content

Refactor terraform imports to use for_each #479

Refactor terraform imports to use for_each

Refactor terraform imports to use for_each #479

Workflow file for this run

name: ci
on: [pull_request] # yamllint disable-line rule:truthy
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull-request.number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
permissions:
contents: read
checks: write # Used to annotate code in the PR
jobs:
build:
name: build-lint-and-test
runs-on: ubuntu-latest
strategy:
matrix:
project:
- bots/buildcaptain
- bots/mariobot
- pipelinerun-logs
- tekton/ci/interceptors/add-team-members
- tekton/ci/interceptors/add-pr-body
- tekton/ci/interceptors/github
- tekton/ci/cluster-interceptors/add-pr-body
- tekton/ci/cluster-interceptors/build-id
- tekton/ci/custom-tasks/pr-commenter
- tekton/ci/custom-tasks/pr-status-updater
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version-file: "go.mod"
- name: build
working-directory: ${{ matrix.project }}
run: |
go build -v ./...
- name: gofmt
working-directory: ${{ matrix.project }}
run: |
gofmt_out=$(gofmt -d $(find * -name '*.go' ! -path 'vendor/*' ! -path 'third_party/*'))
if [[ -n "$gofmt_out" ]]; then
failed=1
fi
echo "$gofmt_out"
- name: golangci-lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
version: v2.1.6
only-new-issues: true
args: --timeout=10m
working-directory: ${{ matrix.project }}
- name: yamllint
working-directory: ${{ matrix.project }}
run: |
sudo apt update && sudo apt install -y yamllint
yamllint -c $(git rev-parse --show-toplevel)/.yamllint $(find . -path ./vendor -prune -o -type f -regex ".*y[a]ml" -print | tr '\n' ' ')
- name: test
working-directory: ${{ matrix.project }}
run: |
go test -v ./...