Skip to content

Commit 3cdf010

Browse files
authored
chore: fix CODEOWNERS and workflow for canister-logs example (#872)
1 parent 85cd3a6 commit 3cdf010

File tree

7 files changed

+144
-0
lines changed

7 files changed

+144
-0
lines changed

.github/CODEOWNERS

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/motoko/basic_bitcoin/ @dfinity/execution
1515
/motoko/basic_dao/ @dfinity/languages
1616
/motoko/calc/ @dfinity/languages
17+
/motoko/canister_logs/ @dfinity/execution
1718
/motoko/cert-var/ @dfinity/trust
1819
/motoko/classes/ @dfinity/languages
1920
/motoko/composite_query/ @dfinity/languages
@@ -54,6 +55,7 @@
5455

5556
/rust/basic_bitcoin/ @dfinity/execution
5657
/rust/basic_dao/ @dfinity/testing-verification
58+
/rust/canister_logs/ @dfinity/execution
5759
/rust/canister-info/ @dfinity/testing-verification
5860
/rust/composite_query/ @dfinity/execution
5961
/rust/counter/ @dfinity/growth
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: motoko-canister-logs
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
paths:
8+
- motoko/canister_logs/**
9+
- .github/workflows/provision-darwin.sh
10+
- .github/workflows/provision-linux.sh
11+
- .github/workflows/motoko-canister-logs-example.yaml
12+
- .ic-commit
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
jobs:
17+
motoko-canister-logs-example-darwin:
18+
runs-on: macos-12
19+
steps:
20+
- uses: actions/checkout@v1
21+
- name: Provision Darwin
22+
run: bash .github/workflows/provision-darwin.sh
23+
- name: Motoko Canister Logs Darwin
24+
run: |
25+
dfx start --background
26+
pushd motoko/canister_logs
27+
make test
28+
popd
29+
motoko-canister-logs-example-linux:
30+
runs-on: ubuntu-20.04
31+
steps:
32+
- uses: actions/checkout@v1
33+
- name: Provision Linux
34+
run: bash .github/workflows/provision-linux.sh
35+
- name: Motoko Canister Logs Linux
36+
run: |
37+
dfx start --background
38+
pushd motoko/canister_logs
39+
make test
40+
popd
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: rust-canister-logs
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
paths:
8+
- rust/canister_logs/**
9+
- .github/workflows/provision-darwin.sh
10+
- .github/workflows/provision-linux.sh
11+
- .github/workflows/rust-canister-logs-example.yaml
12+
- .ic-commit
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
jobs:
17+
rust-canister-logs-example-darwin:
18+
runs-on: macos-12
19+
steps:
20+
- uses: actions/checkout@v1
21+
- name: Provision Darwin
22+
run: bash .github/workflows/provision-darwin.sh
23+
- name: Rust Canister Logs Darwin
24+
run: |
25+
dfx start --background
26+
pushd rust/canister_logs
27+
make test
28+
popd
29+
rust-canister-logs-example-linux:
30+
runs-on: ubuntu-20.04
31+
steps:
32+
- uses: actions/checkout@v1
33+
- name: Provision Linux
34+
run: bash .github/workflows/provision-linux.sh
35+
- name: Rust Canister Logs Linux
36+
run: |
37+
dfx start --background
38+
pushd rust/canister_logs
39+
make test
40+
popd

motoko/canister_logs/Makefile

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.PHONY: all
2+
all: build
3+
4+
.PHONY: build
5+
.SILENT: build
6+
build:
7+
dfx canister create CanisterLogs
8+
dfx build
9+
10+
.PHONY: install
11+
.SILENT: install
12+
install: build
13+
dfx canister install CanisterLogs
14+
15+
.PHONY: upgrade
16+
.SILENT: upgrade
17+
upgrade: build
18+
dfx canister install CanisterLogs --mode=upgrade
19+
20+
.PHONY: test
21+
.SILENT: test
22+
test: install
23+
dfx canister call CanisterLogs print 'hi'
24+
dfx canister logs CanisterLogs \
25+
| grep 'hi' && echo 'PASS'
26+
27+
.PHONY: clean
28+
.SILENT: clean
29+
clean:
30+
rm -fr .dfx

motoko/canister_logs/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ keywords: [beginner, motoko, canister logs, logging]
99
## Prerequisites
1010
This example requires an installation of:
1111

12+
- [x] DFX version 0.19.0 or newer
1213
- [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/).
1314
- [x] Download the following project files from GitHub: `git clone https://github.com/dfinity/examples/`
1415

rust/canister_logs/Makefile

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.PHONY: all
2+
all: build
3+
4+
.PHONY: build
5+
.SILENT: build
6+
build:
7+
dfx canister create canister_logs
8+
dfx build
9+
10+
.PHONY: install
11+
.SILENT: install
12+
install: build
13+
dfx canister install canister_logs
14+
15+
.PHONY: upgrade
16+
.SILENT: upgrade
17+
upgrade: build
18+
dfx canister install canister_logs --mode=upgrade
19+
20+
.PHONY: test
21+
.SILENT: test
22+
test: install
23+
dfx canister call canister_logs print 'hi'
24+
dfx canister logs canister_logs \
25+
| grep 'hi' && echo 'PASS'
26+
27+
.PHONY: clean
28+
.SILENT: clean
29+
clean:
30+
rm -fr .dfx

rust/canister_logs/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ keywords: [beginner, rust, canister logs, logging]
99
## Prerequisites
1010
This example requires an installation of:
1111

12+
- [x] DFX version 0.19.0 or newer
1213
- [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/).
1314
- [x] Download the following project files from GitHub: `git clone https://github.com/dfinity/examples/`
1415

0 commit comments

Comments
 (0)