Skip to content

Commit

Permalink
Tidy github actions and added some quality gate checks
Browse files Browse the repository at this point in the history
  • Loading branch information
toppercodes committed Apr 6, 2024
1 parent 95f62c3 commit 19a2acb
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 3 deletions.
15 changes: 15 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: gomod
directory: /
schedule:
interval: daily
ignore:
- dependency-name: "*"
update-types:
- version-update:semver-minor
- version-update:semver-major
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
34 changes: 34 additions & 0 deletions .github/workflows/acc-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: acc-tests

on:
schedule:
- cron: 0 0 * * *
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
env:
GO111MODULE: on
strategy:
matrix:
go-version: [ 1.21.x ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Acceptance Tests
env:
AXIOM_TOKEN: ${{ secrets.TF_PROVIDER_API_TOKEN }}
AXIOM_ORG_ID: ${{ vars.AXIOM_ORG_ID }}
AXIOM_URL: ${{ vars.AXIOM_URL }}
run: |
make testacc
56 changes: 56 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: PR

on:
pull_request:
branches:
- main
push:
branches:
- main
merge_group:
types:
- checks_requested

# Make sure the workflow is only ever run for the latest
# changes in the PR.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint
needs: gen-diff
runs-on: ubuntu-latest
strategy:
matrix:
go:
- "1.21"
- "1.22"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: false
- run: echo "GOLANGCI_LINT_VERSION=$(go list -m -f '{{.Version}}' github.com/golangci/golangci-lint)" >> $GITHUB_ENV
- uses: golangci/golangci-lint-action@v4
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}

build:
env:
GO111MODULE: on
strategy:
matrix:
go-version: [ 1.21.x ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Run build
run: make build
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version: 1.21.x
-
name: Import GPG key
id: import_gpg
Expand Down

0 comments on commit 19a2acb

Please sign in to comment.