Skip to content

feat(cicd): build and test workflow #1

feat(cicd): build and test workflow

feat(cicd): build and test workflow #1

Workflow file for this run

name: Build and Test Project
on:
push:
paths:
- "src/**"
- "static/**"
- "Cargo.toml"
- ".github/workflows/build-and-test.yml" # This file
branches:
- main
pull_request:
paths:
- "src/**"
- "static/**"
- "Cargo.toml"
- ".github/workflows/build-and-test.yml" # This file
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rust-src
override: true
- name: Add Wasm target
run: rustup target add wasm32-unknown-unknown
- name: Build project
run: cargo build --release
- name: Test project
run: cargo test