gitbutler/.github/workflows/push.yaml

110 lines
3.2 KiB
YAML
Raw Normal View History

2023-02-20 15:12:24 +03:00
name: "Test"
on: [push]
jobs:
2023-02-27 12:50:57 +03:00
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"]
2023-03-07 19:11:49 +03:00
- name: Lint frontend
2023-02-27 12:50:57 +03:00
run: |
pnpm lint
2023-03-07 19:11:49 +03:00
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: |
2023-02-27 12:50:57 +03:00
pnpm check
2023-02-20 16:04:26 +03:00
test:
runs-on: ubuntu-latest
2023-02-20 15:12:24 +03:00
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
2023-02-28 10:59:02 +03:00
- name: Install pnpm
2023-02-20 15:12:24 +03:00
uses: pnpm/action-setup@v2
with:
version: 7.x.x
2023-02-28 10:59:02 +03:00
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
2023-02-20 15:12:24 +03:00
- name: Setup rust
uses: dtolnay/rust-toolchain@stable
2023-02-20 16:14:28 +03:00
- name: Cache rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
2023-02-28 10:42:17 +03:00
src-tauri/target/
2023-02-20 16:14:28 +03:00
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2023-02-28 10:59:02 +03:00
2023-02-28 10:42:17 +03:00
- name: Install system dependencies
2023-02-20 16:14:28 +03:00
uses: daaku/gh-action-apt-install@v4
2023-02-28 10:42:17 +03:00
if: runner.os == 'Linux'
2023-02-20 16:14:28 +03:00
with:
2023-02-20 16:29:10 +03:00
# 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
2023-02-20 15:12:24 +03:00
2023-02-28 10:42:17 +03:00
- name: Build frontend
run: pnpm build
2023-02-20 16:41:52 +03:00
2023-02-20 15:12:24 +03:00
- name: Test rust
working-directory: src-tauri
2023-02-28 10:42:17 +03:00
run: cargo test