Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6307bb0
feat: add GitHub Action for Fixture Regeneration
ryan-gang Jan 3, 2025
3d08240
ci: trigger CI
ryan-gang Jan 3, 2025
8b8aa36
ci: update GitHub Actions workflow to trigger fixture regeneration on…
ryan-gang Jan 3, 2025
93b5dd1
ci: enhance GitHub Actions workflow to include label condition for fi…
ryan-gang Jan 3, 2025
38a1f71
ci: add conditional label check for fixture regeneration in GitHub Ac…
ryan-gang Jan 3, 2025
6ca410f
feat: make test.yml reusable
ryan-gang Jan 7, 2025
8542919
ci: add GitHub Actions workflow to run tests on push events
ryan-gang Jan 7, 2025
0d7c22e
ci: simplify GitHub Actions workflow by consolidating setup steps and…
ryan-gang Jan 7, 2025
55b2a44
ci: update codecrafters-action version in GitHub Actions workflow for…
ryan-gang Jan 7, 2025
72c1d46
ci: update codecrafters-action version in GitHub Actions workflow for…
ryan-gang Jan 7, 2025
60d5029
ci: remove deprecated test-on-push workflow and update test.yml to tr…
ryan-gang Jan 7, 2025
773e0f5
ci: update fixtures.yml to include tester_repo input for fixture rege…
ryan-gang Jan 7, 2025
86c55ce
test: update 1.lox to test CI job
ryan-gang Jan 7, 2025
228188c
ci: add regenerated fixtures
ryan-gang Jan 7, 2025
2a50e54
refactor: simplify 1.lox by removing redundant print statements
ryan-gang Jan 7, 2025
1d114d2
ci: update fixtures.yml to use the latest master branch for fixture r…
ryan-gang Jan 7, 2025
02e84f1
remove: delete interpreter-tester subproject as it is no longer needed
ryan-gang Jan 7, 2025
05c870b
ci: add regenerated fixtures
ryan-gang Jan 7, 2025
b987c45
Revert "ci: add regenerated fixtures"
ryan-gang Jan 7, 2025
217e546
ci: add regenerated fixtures
ryan-gang Jan 7, 2025
d59f4ae
ci: enhance test workflow with multi-language setup and jlox compilation
ryan-gang Jan 7, 2025
16b90ed
ci: add regenerated fixtures
ryan-gang Jan 7, 2025
8d1dff9
Remove unnecessary write permission for contents in fixtures.yml work…
rohitpaulk Jan 10, 2025
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
17 changes: 17 additions & 0 deletions .github/workflows/fixtures.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Trigger Fixture Regeneration

permissions:
pull-requests: write

on:
pull_request:
types:
- labeled

jobs:
regenerate_fixtures:
if: github.event.label.name == 'regenerate-fixtures'
uses: codecrafters-io/tester-utils/.github/workflows/fixtures.yml@master
with:
tester_repo: interpreter-tester
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ jobs:
cp -r ./internal/test_helpers/jlox08/* ./craftinginterpreters/build/gen/chap10_functions
cp -r ./internal/test_helpers/jlox08/* ./craftinginterpreters/build/gen/chap13_inheritance

- run: make test
- run: make test
2 changes: 2 additions & 0 deletions internal/test_helpers/fixtures/pass_control_flow
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Debug = true
[stage-9] [test-1] Writing contents to ./test.lox:
[stage-9] [test-1] [test.lox] // This should print the string if the condition evaluates to True
[stage-9] [test-1] [test.lox] if (false) print "foo";
[stage-9] [test-1] [test.lox] if (false) print "foo";
[stage-9] [test-1] [test.lox] if (false) print "foo";
[stage-9] [test-1] $ ./your_program.sh run test.lox
[stage-9] [test-1] ✓ 1 line(s) match on stdout
[stage-9] [test-1] ✓ Received exit code 0.
Expand Down
2 changes: 2 additions & 0 deletions internal/test_helpers/fixtures/pass_control_flow_final
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Debug = true
[stage-9] [test-1] Writing contents to ./test.lox:
[stage-9] [test-1] [test.lox] // This should print the string if the condition evaluates to True
[stage-9] [test-1] [test.lox] if (false) print "foo";
[stage-9] [test-1] [test.lox] if (false) print "foo";
[stage-9] [test-1] [test.lox] if (false) print "foo";
[stage-9] [test-1] $ ./your_program.sh run test.lox
[stage-9] [test-1] ✓ 1 line(s) match on stdout
[stage-9] [test-1] ✓ Received exit code 0.
Expand Down
2 changes: 2 additions & 0 deletions test_programs/c1/1.lox
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
expected_error_type: none
---
// This should print the string if the condition evaluates to True
if (<<RANDOM_BOOLEAN>>) print "<<RANDOM_STRING>>";
if (<<RANDOM_BOOLEAN>>) print "<<RANDOM_STRING>>";
if (<<RANDOM_BOOLEAN>>) print "<<RANDOM_STRING>>";
Loading