Setup ginkgo and testcontainers (#4) #12
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: CI | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
module: | |
- provider | |
- sdk | |
- tests | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: provider/go.mod | |
cache-dependency-path: provider/go.sum | |
- name: golangci-lint ${{ matrix.module }} | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.59 | |
working-directory: ${{ matrix.module }} | |
provisioner: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: provider/go.mod | |
cache-dependency-path: provider/go.sum | |
- name: Make | |
run: make provisioner | |
- name: Upload binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: provisioner | |
path: bin/provisioner | |
provider: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Unshallow clone for tags | |
run: git fetch --prune --unshallow --tags | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: provider/go.mod | |
cache-dependency-path: provider/go.sum | |
- name: Install pulumictl | |
uses: jaxxstorm/[email protected] | |
with: | |
repo: pulumi/pulumictl | |
- name: Install Pulumi | |
uses: pulumi/actions@v5 | |
with: | |
pulumi-version-file: .versions/pulumi | |
- name: Make | |
run: make provider | |
test: | |
runs-on: ubuntu-latest | |
needs: [provisioner, provider] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: provider/go.mod | |
cache-dependency-path: provider/go.sum | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Download provisioner | |
uses: actions/download-artifact@v4 | |
with: | |
name: provisioner | |
path: bin | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
push: false | |
cache-from: type=gha | |
cache-to: type=gha | |
context: . | |
file: tests/Dockerfile | |
- name: Test | |
run: make test_provider |