diff --git a/.github/workflows/build.yml b/.github/workflows/ci.yml similarity index 71% rename from .github/workflows/build.yml rename to .github/workflows/ci.yml index b3353bda2..49d0037b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Build App +name: CI on: push: @@ -9,9 +9,42 @@ on: - main jobs: + lint-app: + name: Lint (biomejs) + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'pnpm' + - run: pnpm install + - run: pnpm lint:check + + run-unit-tests: + name: Run Tests + runs-on: macos-latest + needs: lint-app + + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'pnpm' + - run: pnpm install + - run: pnpm tsc --noEmit + - run: pnpm test -- --coverage --runInBand --verbose + - name: Coveralls + uses: coverallsapp/github-action@v2 + build-macos: name: Build macOS (electron-builder) runs-on: macos-latest + needs: run-unit-tests steps: - uses: actions/checkout@v4 @@ -38,6 +71,7 @@ jobs: build-windows: name: Build Windows (electron-builder) runs-on: windows-latest + needs: run-unit-tests steps: - uses: actions/checkout@v4 @@ -61,6 +95,7 @@ jobs: build-linux: name: Build Linux (electron-builder) runs-on: ubuntu-latest + needs: run-unit-tests steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index fcf716be9..000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Linting - -on: - push: - branches: - - main - pull_request: - -jobs: - lint: - name: biomejs - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v3 - - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'pnpm' - - run: pnpm install - - run: pnpm lint:check diff --git a/.github/workflows/pr-triage.yml b/.github/workflows/pr-triage.yml deleted file mode 100644 index 5b2dc505c..000000000 --- a/.github/workflows/pr-triage.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Triage PR - -on: - pull_request: - types: [opened, edited, synchronize, ready_for_review] - branches: [main] - -permissions: - contents: read # the config file - pull-requests: write # for labeling pull requests (on: pull_request_target or on: pull_request) - statuses: write # to generate status - checks: write # to generate status - -jobs: - labeler: - name: Labeler - runs-on: ubuntu-latest - steps: - - uses: fuxingloh/multi-labeler@v4 \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b869a8567..ce65f517a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Release App +name: Release on: push: diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml new file mode 100644 index 000000000..fa590ffd0 --- /dev/null +++ b/.github/workflows/renovate.yml @@ -0,0 +1,27 @@ +name: Renovate + +on: + push: + branches: + - main + paths: + - 'renovate.json' + pull_request: + paths: + - 'renovate.json' + +jobs: + renovate-config-validator: + name: Config validation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + - uses: pnpm/action-setup@v3 + with: + run_install: false + - run: pnpm install --global renovate + - name: Validate Renovate config + run: renovate-config-validator diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 9f9b2c7ad..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Run Tests - -on: - push: - branches: - - main - pull_request: - -jobs: - run-unit-tests: - name: Run Tests - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v3 - - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'pnpm' - - run: pnpm install - - run: pnpm tsc --noEmit - - run: pnpm test -- --coverage --runInBand --verbose - - name: Coveralls - uses: coverallsapp/github-action@v2 diff --git a/.github/workflows/validator.yml b/.github/workflows/triage.yml similarity index 69% rename from .github/workflows/validator.yml rename to .github/workflows/triage.yml index 2aa9c2f8c..724057c32 100644 --- a/.github/workflows/validator.yml +++ b/.github/workflows/triage.yml @@ -1,8 +1,15 @@ -name: Validators +name: Triage PR on: pull_request: - types: [opened, edited, synchronize, reopened] + types: [opened, edited, synchronize, ready_for_review] + branches: [main] + +permissions: + contents: read # the config file + pull-requests: write # for labeling pull requests (on: pull_request_target or on: pull_request) + statuses: write # to generate status + checks: write # to generate status jobs: pr-lint: @@ -28,18 +35,9 @@ jobs: if (!match.groups.subject) { core.setFailed('Missing subject in PR title'); } - - renovate: - name: Validate Renovate config + + labeler: + name: Auto-label PR runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version-file: .nvmrc - - uses: pnpm/action-setup@v3 - with: - run_install: false - - run: pnpm install --global renovate - - name: Validate Renovate config - run: renovate-config-validator + - uses: fuxingloh/multi-labeler@v4 \ No newline at end of file diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index a46aa27c2..d5537f6af 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -3,7 +3,7 @@ name: Update Website on: push: tags: 'v*' - workflow_dispatch: # For manually verify + workflow_dispatch: # For manually verify website deployment jobs: redeploy-website: