forked from dfinity/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (58 loc) · 1.66 KB
/
motoko-phone-book-example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: motoko-phone-book
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/phone-book/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/motoko-phone-book-example.yaml
motoko-phone-book-example-darwin:
needs: changes
if: github.event_name == 'push' || needs.changes.outputs.sources == 'true'
runs-on: macos-12
steps:
- uses: actions/checkout@v1
- name: Provision Darwin
run: bash .github/workflows/provision-darwin.sh
- name: Motoko Phone Book Darwin
run: |
dfx start --background
pushd motoko/phone-book
make test
popd
motoko-phone-book-example-linux:
needs: changes
if: github.event_name == 'push' || needs.changes.outputs.sources == 'true'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Provision Linux
run: bash .github/workflows/provision-linux.sh
- name: Motoko Phone Book Linux
run: |
dfx start --background
pushd motoko/phone-book
make test
popd