Skip to content

Add cargo-cache to dev environment #720

Add cargo-cache to dev environment

Add cargo-cache to dev environment #720

Workflow file for this run

name: Test chart build
on: [push, pull_request]
defaults:
run:
working-directory: ./chart
jobs:
build:
if: ${{(github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Cache files
uses: actions/cache@v4
with:
path: |
~/.cargo
~/.local/lib/python*/
**/node_modules
**/target
key: ${{ runner.os }}-${{ hashFiles('**/package.json', '**/Cargo.toml') }}
- name: Versions
run: |
npm -v
node -v
- name: Install python build dependencies
run: python3 -m pip install setuptools wheel
- name: Install rustup
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
targets: wasm32-unknown-unknown
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build all
run: make
- name: Check that no files are overwritten
run: git diff --exit-code
test:
if: ${{(github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./chart/chart
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install esbuild
run: cd javascript && npm i esbuild
- name: Install testing requirements
run: pip install -r requirements_tests.txt
- name: Build
run: make javascript/dist/sseq_chart_node.js
- name: Test
run: pytest tests python/tests
clean:
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Make clean does not remove commited files
run: make clean && git diff --exit-code