name: "Test" on: [push] jobs: lint: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Setup node uses: actions/setup-node@v3 with: node-version: 18 - name: Setup pnpm uses: pnpm/action-setup@v2 with: version: 7.x.x run_install: | args: ["--frozen-lockfile"] - name: Lint frontend run: | pnpm lint check: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Setup node uses: actions/setup-node@v3 with: node-version: 18 - name: Setup pnpm uses: pnpm/action-setup@v2 with: version: 7.x.x run_install: | args: ["--frozen-lockfile"] - name: check frontend run: | pnpm check test: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Setup node uses: actions/setup-node@v3 with: node-version: 18 - name: Install pnpm uses: pnpm/action-setup@v2 with: version: 7.x.x run_install: false - name: Get pnpm store directory id: pnpm-cache shell: bash run: | echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - uses: actions/cache@v3 name: Setup pnpm cache with: path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm-store- - name: Install pnpm dependencies run: pnpm install - name: Setup rust uses: dtolnay/rust-toolchain@stable - name: Cache rust dependencies uses: actions/cache@v3 with: path: | ~/.cargo/bin/ ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ src-tauri/target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Install system dependencies uses: daaku/gh-action-apt-install@v4 if: runner.os == 'Linux' with: # https://tauri.app/v1/guides/getting-started/prerequisites#setting-up-linux packages: libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev - name: Build frontend run: pnpm build - name: Test rust working-directory: src-tauri run: cargo test