-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix 'build' CI, passing TypeScript * Attempt to actually build the binaries by GitHub actions
- Loading branch information
Showing
13 changed files
with
237 additions
and
303 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,44 @@ | ||
/* eslint-env node */ | ||
module.exports = { | ||
env: { | ||
node: true, | ||
}, | ||
root: true, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
// maybe one day, enable the following: | ||
// "plugin:@typescript-eslint/recommended-requiring-type-checking:" | ||
// "plugin:@typescript-eslint/stylistic-type-checked", | ||
'plugin:jsx-a11y/recommended', | ||
'plugin:import/recommended', | ||
'plugin:import/typescript', | ||
'plugin:jsx-a11y/recommended', | ||
'plugin:react/recommended', | ||
'plugin:react/jsx-runtime', | ||
'plugin:react-hooks/recommended', | ||
'prettier', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: true, | ||
project: ['./tsconfig.json'], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
settings: { react: { version: 'detect' } }, | ||
plugins: ['@typescript-eslint', 'jsx-a11y', 'import'], | ||
rules: { | ||
'import/order': [ | ||
'error', | ||
{ | ||
'newlines-between': 'always', | ||
distinctGroup: true, | ||
}, | ||
], | ||
// We let TypeScript and Vite handle that | ||
'import/no-unresolved': 'off', | ||
'spaced-comment': ['error', 'always'], | ||
'no-console': 2, | ||
}, | ||
}; | ||
/* eslint-env node */ | ||
module.exports = { | ||
env: { | ||
node: true, | ||
}, | ||
root: true, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
// maybe one day, enable the following: | ||
// "plugin:@typescript-eslint/recommended-requiring-type-checking:" | ||
// "plugin:@typescript-eslint/stylistic-type-checked", | ||
'plugin:jsx-a11y/recommended', | ||
'plugin:import/recommended', | ||
'plugin:import/typescript', | ||
'plugin:jsx-a11y/recommended', | ||
'plugin:react/recommended', | ||
'plugin:react/jsx-runtime', | ||
'plugin:react-hooks/recommended', | ||
'prettier', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: true, | ||
project: ['./tsconfig.json'], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
settings: { react: { version: 'detect' } }, | ||
plugins: ['@typescript-eslint', 'jsx-a11y', 'import'], | ||
rules: { | ||
'import/order': [ | ||
'error', | ||
{ | ||
'newlines-between': 'always', | ||
distinctGroup: true, | ||
}, | ||
], | ||
// We let TypeScript and Vite handle that | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'import/no-unresolved': 'off', | ||
'spaced-comment': ['error', 'always'], | ||
'no-console': 2, | ||
}, | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,104 +1,104 @@ | ||
name: build | ||
|
||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the main branch | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- '*' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
qa: | ||
# For QA (lint, test, etc), Linux is enough | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
||
- name: install dependencies (ubuntu only) | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Generate types | ||
run: cargo test --manifest-path src-tauri/Cargo.toml | ||
|
||
- name: 'Test: formatting' | ||
run: 'yarn run test:formatting' | ||
|
||
- name: 'Test: TS/JS linting' | ||
run: 'yarn run test:lint' | ||
|
||
- name: 'Test: CSS linting' | ||
run: 'yarn run test:css' | ||
|
||
- name: 'Test: unit' | ||
run: 'yarn run test:unit' | ||
|
||
- name: 'Test: typings' | ||
run: 'yarn run test:typings' | ||
|
||
- name: Build application | ||
run: yarn run build | ||
|
||
# - uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: application-build | ||
# path: dist/ | ||
|
||
# Documentation on environments: | ||
# https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners | ||
|
||
binaries: | ||
permissions: | ||
contents: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [macos-latest, ubuntu-22.04, windows-latest] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: install Rust stable | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: install dependencies (ubuntu only) | ||
if: matrix.platform == 'ubuntu-22.04' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | ||
- name: install frontend dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- uses: tauri-apps/tauri-action@v0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
includeRelease: false | ||
includeUpdaterJson: false | ||
name: build | ||
|
||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the main branch | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- '*' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
qa: | ||
# For QA (lint, test, etc), Linux is enough | ||
# https://github.com/tauri-apps/tauri-action/issues/745#issuecomment-2024998604 | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
||
- name: Install dependencies (ubuntu only) | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Generate types | ||
run: cargo test --manifest-path src-tauri/Cargo.toml | ||
|
||
- name: 'Test: formatting' | ||
run: 'yarn run test:formatting' | ||
|
||
- name: 'Test: TS/JS linting' | ||
run: 'yarn run test:lint' | ||
|
||
- name: 'Test: CSS linting' | ||
run: 'yarn run test:css' | ||
|
||
- name: 'Test: unit' | ||
run: 'yarn run test:unit' | ||
|
||
- name: 'Test: Rust + Code Generation' | ||
run: 'cargo test --manifest-path src-tauri/Cargo.toml' | ||
|
||
- name: 'Test: Types' | ||
run: 'yarn run test:typings' | ||
|
||
- name: Build application | ||
run: yarn run build | ||
|
||
# Documentation on environments: | ||
# https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners | ||
|
||
binaries: | ||
needs: qa | ||
|
||
permissions: | ||
contents: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [macos-latest, ubuntu-22.04, windows-latest] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install Rust stable | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Install native dependencies (ubuntu only) | ||
if: matrix.platform == 'ubuntu-22.04' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | ||
- name: Install frontend dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- uses: tauri-apps/tauri-action@v0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
includeUpdaterJson: false |
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
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
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
Oops, something went wrong.