ci: update pipelines to use common actions #174
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: 'Tests' | |
on: | |
pull_request: | |
types: | |
- opened | |
- edited | |
- reopened | |
- synchronize | |
- labeled | |
merge_group: | |
types: [checks_requested] | |
branches: | |
- main | |
jobs: | |
rust_tests: | |
name: 'rust-tests:required' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout code' | |
uses: actions/checkout@v4 | |
- name: 'Test cargo crates' | |
run: cargo test | |
motoko_tests: | |
name: 'motoko-tests:required' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout code' | |
uses: actions/checkout@v4 | |
- name: Setup DFX | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: 'auto' | |
- name: 'Start DFX' | |
run: dfx start --background | |
- name: 'Test cns_root canister' | |
run: | | |
dfx deploy --no-wallet cns_root_test | |
dfx canister call cns_root_test runTests "()" | |
- name: 'Stop DFX' | |
run: dfx stop |