Env var update (#171) #706
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- "**" | |
types: | |
- reopened | |
- ready_for_review | |
- synchronize | |
jobs: | |
main: | |
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Scarb | |
uses: software-mansion/setup-scarb@v1 | |
with: | |
tool-versions: .tool-versions | |
- name: Test the code | |
run: | | |
# Run the test and capture the output | |
output=$(scarb test 2>&1) || true | |
# Echo the entire output (optional, for debugging purposes) | |
echo "$output" | |
# Check if there were any failed tests | |
if echo "$output" | grep -q "test result: ok"; then | |
exit 0 | |
else | |
exit 1 | |
fi |