This repository was archived by the owner on Apr 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
61 lines (52 loc) · 1.71 KB
/
ci.yml
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
59
60
61
on: [push, pull_request]
name: ci
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
override: true
- name: Update package repository
run: sudo apt update
- name: Install packages
run: |
sudo apt clean
sudo apt install -y build-essential libssl-dev nodejs
- name: Install wrangler
run: |
wget https://github.com/cloudflare/wrangler/releases/download/v1.16.1/wrangler-v1.16.1-x86_64-unknown-linux-musl.tar.gz
tar -xzf ./wrangler-v1.16.1-x86_64-unknown-linux-musl.tar.gz
sudo cp ./dist/wrangler /usr/local/bin
- name: Install miniflare
working-directory: ./tests
run: npm install
- name: Install wasmpack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
- name: Run cargo test
uses: actions-rs/cargo@v1
env:
OPENSSL_LIB_DIR: "/usr/lib/x86_64-linux-gnu"
OPENSSL_INCLUDE_DIR: "/usr/include/openssl"
ACCOUNT_ID: ${{ secrets.ACCOUNT_ID }}
KV_ID: ${{ secrets.KV_ID }}
CF_ACCOUNT_ID: ${{ secrets.ACCOUNT_ID }}
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
with:
command: test
args: -- --nocapture