Skip to content

Commit

Permalink
Add a main build and codecov integration
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhailshilkov committed Sep 17, 2024
1 parent 78792a4 commit 938f9ac
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Run Acceptance Tests on main

on:
push:
branches:
- main

jobs:
lint:
uses: ./.github/workflows/stage-lint.yml
test:
uses: ./.github/workflows/stage-test.yml
with:
live-test: true
secrets:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_CI_ROLE_ARN: ${{ secrets.AWS_CI_ROLE_ARN }}
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/pr-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ jobs:
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4 changes: 4 additions & 0 deletions .github/workflows/stage-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ jobs:
uses: pulumi/action-install-pulumi-cli@v2
- name: Test
run: make test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
strategy:
fail-fast: false
matrix:
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ examples/**/schema-*.json
**/testdata/rapid/**

go.work
go.work.sum
go.work.sum

# Code coverage reports
**/coverage.txt
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: build build_examples install_examples lint lint-copyright lint-golang

GO_TEST_FLAGS=-race
GO_TEST_FLAGS=-race -coverprofile="coverage.txt"
GO_TEST=go test ${GO_TEST_FLAGS}

build:
Expand Down
8 changes: 8 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
coverage:
status:
project:
default:
informational: true
patch:
default:
informational: true

0 comments on commit 938f9ac

Please sign in to comment.