Feature/templates #9
Workflow file for this run
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: Rust | |
on: | |
pull_request: | |
branches: ["main", "develop"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: cargo build --verbose --release | |
test_run: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: build and run cli | |
run: | | |
cargo build --release | |
mkdir testdir | |
cp target/release/cmake-init testdir | |
cd testdir | |
./cmake-init --name test | |
if [ "$?" -eq 0 ]; then | |
echo "Test passed" | |
exit 0 | |
else | |
echo "Test failed" | |
fi | |
if [[ -f "src/main.c" ]] ; then | |
echo "Test passed" | |
exit 0 | |
else | |
echo "Test failed" | |
exit 1 | |
fi |