Skip to content

feat: Added drift subcommands for comprehensive infrastructure analysis #16

feat: Added drift subcommands for comprehensive infrastructure analysis

feat: Added drift subcommands for comprehensive infrastructure analysis #16

Workflow file for this run

name: Tests
on:
pull_request:
paths-ignore:
- '**.md'
- 'docs/**'
- 'LICENSE'
- '.github/**'
- '!.github/workflows/test.yml'
branches:
- main
push:
paths-ignore:
- '**.md'
- 'docs/**'
- 'LICENSE'
- '.github/**'
- '!.github/workflows/test.yml'
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
env:
GO_VERSION: '1.25.5'
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
go-version: ['1.24', '1.25.5']
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
cache: true
cache-dependency-path: go.sum
- name: Download dependencies
run: go mod download
- name: Run tests
run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
- name: Upload coverage reports to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.go-version == env.GO_VERSION
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.out
fail_ci_if_error: false
name: tfskel-codecov-coverage
lint:
name: Lint
runs-on: ubuntu-latest
needs: test
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.8.0 # Pin specific version
args: --timeout=5m --verbose
build:
name: Build
runs-on: ubuntu-latest
needs: test
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Build
run: go build -v -ldflags="-w -s" -o tfskel .
- name: Test binary
run: |
./tfskel --version
./tfskel --help