Skip to content

Commit

Permalink
Use matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanjos committed Jun 13, 2024
1 parent 8fc4937 commit fb69794
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/check_dependents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@ on:

jobs:
test_dependents:
name: Ensure dependents tests pass
name: Ensure ${{ matrix.dependent }} tests pass
runs-on: ubuntu-20.04

strategy:
matrix:
dependent:
- 'absinthe_plug'
- 'absinthe_phoenix'
- 'absinthe_relay'

steps:
- name: Set up Elixir
uses: erlef/setup-beam@v1
Expand All @@ -21,29 +28,29 @@ jobs:
- name: Checkout absinthe
uses: actions/checkout@v4

- name: Checkout absinthe_plug
- name: Checkout ${{ matrix.dependent }}
uses: actions/checkout@v4
with:
repository: 'absinthe-graphql/absinthe_plug'
path: 'absinthe_plug'
repository: 'absinthe-graphql/${{ matrix.dependent }}'
path: '${{ matrix.dependent }}'

- name: Install absinthe package dependencies
run: mix deps.get

- name: Update absinthe dependency
run: 'sed -i -e "s|{:absinthe.*|{:absinthe, path: \"$GITHUB_WORKSPACE\"},|" mix.exs'
working-directory: ./absinthe_plug
working-directory: ./${{ matrix.dependent }}

- name: Cat
run: cat mix.exs
working-directory: ./absinthe_plug
working-directory: ./${{ matrix.dependent }}

- name: Install dependent package dependencies
run: mix deps.get
working-directory: ./absinthe_plug
working-directory: ./${{ matrix.dependent }}

- name: Run unit tests
run: |
mix clean
mix test
working-directory: ./absinthe_plug
working-directory: ./${{ matrix.dependent }}

0 comments on commit fb69794

Please sign in to comment.