Skip to content

Feature/templates

Feature/templates #9

Workflow file for this run

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