Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use setup step from Makefile for setting up environment #51

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: regenerate-fixtures

- name: Set up prerequisites (interpreter)
if: inputs.tester_repo == 'interpreter-tester'
uses: codecrafters-io/codecrafters-action/.github/actions/interpreter-setup@b7d515cea86f1815ce74c6eeb0cb15fb458eda88

- name: Set up prerequisites (redis)
if: inputs.tester_repo == 'redis-tester'
uses: codecrafters-io/codecrafters-action/.github/actions/redis-setup@ef5aeb9504e08cccfe71e1dbcf806fab3738019d
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try to store the action in .github/actions/setup.yml for all repos, and just invoke that directly here (no conditionals, so we don't need to edit code when new repositories are added)

- name: Set up prerequisites
run: |
if grep -q "^setup:" Makefile; then
make setup
else
echo "No setup target found in Makefile, skipping..."
fi

- name: Setup git config
run: |
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ test:

test_and_watch:
onchange '**/*' -- go test -v ./...

setup:
echo "Setup in tester-utils"
Loading