Skip to content

Commit

Permalink
add github actions (5)
Browse files Browse the repository at this point in the history
  • Loading branch information
QpxDesign committed Mar 2, 2024
1 parent 1448ee9 commit a5c66cf
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,22 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2


- name: Build project
run: cargo build -r --verbose

- name: Run Tests
run: cd tests && cargo run
id: run_tests
run: |
result=$(cd tests && cargo run)
echo "::set-output name=result::$result"
- name: Parse test results
run: |
echo "${{ steps.run_tests.outputs.result }}" | while read -r line; do
if [[ $line == *"Passed!"* ]]; then
echo "Test ${line#*#} - Passed"
else
echo "Test ${line#*#} - Failed"
exit 1
fi
done

0 comments on commit a5c66cf

Please sign in to comment.