This repository has been archived by the owner on Apr 6, 2024. It is now read-only.
chore: update readme #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |