Merge pull request #132 from casper-ecosystem/Update_InstallCommand #249
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
name: ci-cep18 | |
on: | |
push: | |
branches: [master, dev] | |
pull_request: | |
branches: [master, dev] | |
jobs: | |
ci-smart-contract: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3.0.2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
components: rustfmt, clippy | |
# Needed for gcc install | |
- run: sudo apt update && sudo apt install -y build-essential wabt | |
- uses: Swatinem/rust-cache@v1 | |
- run: make prepare | |
- run: make check-lint | |
- run: make test | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: cep18.wasm | |
path: target/wasm32-unknown-unknown/release/cep18.wasm | |
ci-js-client: | |
needs: ci-smart-contract | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
node-version: [16.x, 20.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3.0.2 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: cep18.wasm | |
path: target/wasm32-unknown-unknown/release | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@5b949b50c3461bbcd5a540b150c368278160234a #v3.4.0 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install | |
working-directory: client-js | |
run: npm install | |
- name: Generate WASMS | |
working-directory: ./client-js | |
run: npm run generate:wasm | |
- name: Unit test | |
working-directory: client-js | |
run: npm run test:unit | |
- name: Integration test | |
working-directory: client-js | |
run: npx casper-node-launcher-js node --daemon && npm run test:e2e && npx casper-node-launcher-js stop | |
env: | |
NODE_URL: http://127.0.0.1:7777/rpc | |
EVENT_STREAM_ADDRESS: http://127.0.0.1:9999/events/main |