Skip to content

Commit 6091da1

Browse files
committed
ci: draft first PR workflow
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
1 parent 515746e commit 6091da1

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

.github/workflows/pull-request.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Pull Request CI
2+
on:
3+
pull_request:
4+
branches: [main]
5+
jobs:
6+
check:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: actions-rust-lang/setup-rust-toolchain@v1
11+
- uses: jetli/wasm-pack-action@v0.4.0
12+
with:
13+
version: 'v0.13.1'
14+
- uses: actions/setup-deno
15+
with:
16+
deno-version: v2.x
17+
18+
19+
- name: Prepare
20+
run: deno task prep:ci
21+
env:
22+
IROHA_GIT: https://github.com/hyperledger-iroha/iroha.git
23+
IROHA_REV: v2.0.0-rc.1.0
24+
25+
- name: Type check
26+
run: deno task check:all
27+
28+
- name: Lint, format
29+
run: |
30+
deno lint
31+
deno fmt
32+
33+
- name: Test
34+
run: deno task test

deno.jsonc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626
"dependencies": ["prep:iroha:check"]
2727
},
2828
"prep:crypto-wasm": "deno run --allow-read --allow-env --allow-run --allow-write ./etc/task-prep-crypto-wasm.ts",
29-
"check:all": "deno check packages/*",
29+
"prep:ci": {
30+
"description": "Run all necessary preparations in CI",
31+
"command": "deno task prep:iroha --git $IROHA_GIT --git-rev $IROHA_GIT_REV && deno task prep:iroha:build && deno task prep:crypto-wasm"
32+
},
33+
"check:all": "deno check .",
3034
"test:vitest": {
3135
"dependencies": ["prep:iroha:check"],
3236
"description": "Run Vitest",

0 commit comments

Comments
 (0)