Skip to content

Build & Test Project Across 16+ Test Cases 🚀 #12

Build & Test Project Across 16+ Test Cases 🚀

Build & Test Project Across 16+ Test Cases 🚀 #12

Workflow file for this run

name: Run Tests
run-name: Build & Test Project Across 16+ Test Cases 🚀
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build project
run: cargo build -r --verbose
- name: Run Tests
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