feat: Add Unit Test (#8) #10
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
on: | |
push: | |
branches: main | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
profile: [dev,release] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- run: rustup target add wasm32-unknown-unknown | |
- name: Check | |
run: | | |
cargo clippy --profile ${{matrix.profile}} && \ | |
cargo fmt --check | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- run: rustup target add wasm32-unknown-unknown | |
- run: cargo install wasm-pack | |
- name: Test (unit) | |
run: make test -j 8 | |
spell-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: crate-ci/[email protected] | |
deploy: | |
runs-on: ubuntu-latest | |
needs: | |
- check | |
- test | |
- spell-check | |
permissions: | |
pull-requests: write | |
checks: write | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup target add wasm32-unknown-unknown | |
- run: cargo install wasm-pack | |
- run: make release -j 8 | |
- uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_ENKU }}" | |
projectId: ${{secrets.FIREBASE_PROJECT}} | |
channelId: live |