Skip to content

Commit

Permalink
Set matrix params in reusable workflow instead
Browse files Browse the repository at this point in the history
  • Loading branch information
LandonTClipp committed Nov 26, 2024
1 parent faf5b9d commit d8378e2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/reusable-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,14 @@ name: Reusable Go Test

on:
workflow_call:
inputs:
os:
required: true
type: string
go_versions:
required: true
type: string
secrets:
CODECOV_TOKEN:
required: true

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ${{ fromJson(inputs.os) }}
go_vers: ${{ fromJson(inputs.go_versions) }}

os: ["macos-latest", "ubuntu-latest"]
go_vers: ["1.22", "1.23"]
steps:
- uses: actions/checkout@v2
with:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/tag-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ permissions:
jobs:
test:
uses: ./.github/workflows/reusable-testing.yml
with:
os: '["macos-latest", "ubuntu-latest"]'
go_versions: '["1.22", "1.23"]'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
tag:
runs-on: ubuntu-latest
needs: test
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,4 @@ on:
jobs:
test:
uses: ./.github/workflows/reusable-testing.yml
with:
os: '["macos-latest", "ubuntu-latest"]'
go_versions: '["1.22", "1.23"]'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit d8378e2

Please sign in to comment.