Skip to content

chore(deps): move to wasm32-wasip1 target #22

chore(deps): move to wasm32-wasip1 target

chore(deps): move to wasm32-wasip1 target #22

name: Try to expand local template using cargo-generate
on: [push, pull_request]
jobs:
build:
name: Render template and build
runs-on: ubuntu-latest
env:
PROJECT_NAME: demo
CARGO_GENERATE_VALUE_REGISTRY: ghcr.io
CARGO_GENERATE_VALUE_REGISTRY_MODULE_PATH_PREFIX: "kubewarden/policies"
steps:
- uses: actions/checkout@v4
- uses: cargo-generate/cargo-generate-action@latest
with:
name: ${{ env.PROJECT_NAME }}
- name: Prepare Rust environment
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: wasm32-wasip1
- name: Install kwctl
uses: kubewarden/github-actions/[email protected]
- name: Install bats
uses: mig4/setup-bats@v1
with:
bats-version: 1.8.2
- name: Move rendered template
run: |
# we need to move the generated project to a temp folder, away from the template project
# otherwise `cargo` runs would fail
# see https://github.com/rust-lang/cargo/issues/9922
mv $PROJECT_NAME ${{ runner.temp }}/
- name: Test
run: |
cd ${{ runner.temp }}/$PROJECT_NAME
make test
- name: e2e-tests
run: |
cd ${{ runner.temp }}/$PROJECT_NAME
make e2e-tests