chore: use dfinity/setup-dfx github action #2860
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: motoko-echo | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# JOB to run change detection | |
changes: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: read | |
# Set job outputs to values from filter step | |
outputs: | |
sources: ${{ steps.filter.outputs.sources }} | |
steps: | |
- uses: actions/checkout@v4 | |
if: github.event_name == 'push' | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
sources: | |
- motoko/echo/** | |
- .github/workflows/provision-darwin.sh | |
- .github/workflows/provision-linux.sh | |
- .github/workflows/motoko-echo-example.yaml | |
motoko-echo-example-darwin: | |
needs: changes | |
if: github.event_name == 'push' || needs.changes.outputs.sources == 'true' | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dfinity/setup-dfx@main | |
- name: Provision Darwin | |
run: bash .github/workflows/provision-darwin.sh | |
- name: Motoko Echo Darwin | |
run: | | |
dfx start --background | |
pushd motoko/echo | |
make test | |
popd | |
motoko-echo-example-linux: | |
needs: changes | |
if: github.event_name == 'push' || needs.changes.outputs.sources == 'true' | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dfinity/setup-dfx@main | |
- name: Provision Linux | |
run: bash .github/workflows/provision-linux.sh | |
- name: Motoko Echo Linux | |
run: | | |
dfx start --background | |
pushd motoko/echo | |
make test | |
popd |