Skip to content

Commit

Permalink
Pass secrets to templates
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Navarro Perez <[email protected]>
  • Loading branch information
ajnavarro committed May 6, 2024
1 parent 9316886 commit eefc9ad
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .github/gnokeykc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ jobs:
name: Run Main
uses: ./.github/workflows/main_template.yml
with:
modulepath: "contribs/gnokeykc"
modulepath: "contribs/gnokeykc"
secrets:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 3 additions & 1 deletion .github/workflows/gnodev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ jobs:
name: Run Main
uses: ./.github/workflows/main_template.yml
with:
modulepath: "contribs/gnodev"
modulepath: "contribs/gnodev"
secrets:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 3 additions & 1 deletion .github/workflows/gnofaucet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ jobs:
name: Run Main
uses: ./.github/workflows/main_template.yml
with:
modulepath: "contribs/gnofaucet"
modulepath: "contribs/gnofaucet"
secrets:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 3 additions & 1 deletion .github/workflows/gnoland.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ jobs:
name: Run Main
uses: ./.github/workflows/main_template.yml
with:
modulepath: "gno.land"
modulepath: "gno.land"
secrets:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 3 additions & 1 deletion .github/workflows/gnomod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ jobs:
name: Run Main
uses: ./.github/workflows/main_template.yml
with:
modulepath: "contribs/gnomd"
modulepath: "contribs/gnomd"
secrets:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 3 additions & 1 deletion .github/workflows/gnovm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ jobs:
name: Run Main
uses: ./.github/workflows/main_template.yml
with:
modulepath: "gnovm"
modulepath: "gnovm"
secrets:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
6 changes: 5 additions & 1 deletion .github/workflows/main_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ on:
modulepath:
required: true
type: string

secrets:
codecov-token:
required: true
env:
GOVERSION: 1.22.x

Expand All @@ -25,4 +27,6 @@ jobs:
with:
modulepath: ${{ inputs.modulepath }}
tests-timeout: "30m"
secrets:
codecov-token: ${{ secrets.codecov-token }}

7 changes: 5 additions & 2 deletions .github/workflows/test_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
tests-timeout:
required: true
type: string
secrets:
codecov-token:
required: true

jobs:
test:
Expand All @@ -24,9 +27,9 @@ jobs:
run: go test -coverprofile coverage.out -covermode=atomic -timeout ${{ inputs.tests-timeout }} -v ./...
working-directory: ${{ inputs.modulepath }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
# token: ${{ secrets.CODECOV_TOKEN }} # TODO: moved to codecov v3 because v4 was causing a ton of problems
token: ${{ secrets.codecov-token }}
verbose: true
fail_ci_if_error: true
flags: ${{ inputs.modulepath }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tm2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ jobs:
name: Run Main
uses: ./.github/workflows/main_template.yml
with:
modulepath: "tm2"
modulepath: "tm2"
secrets:
codecov-token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit eefc9ad

Please sign in to comment.