-
Notifications
You must be signed in to change notification settings - Fork 382
58 lines (58 loc) · 1.67 KB
/
motoko-hello-world-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-hello-world
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/hello-world/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/motoko-hello-world-example.yaml
motoko-hello-world-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 Hello World Darwin
run: |
dfx start --background
pushd motoko/hello-world
make test
popd
motoko-hello-world-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 Hello World Linux
run: |
dfx start --background
pushd motoko/hello-world
make test
popd