|
|
|
|
@ -6,6 +6,10 @@ on: |
|
|
|
|
- main |
|
|
|
|
- release-*.*.* |
|
|
|
|
|
|
|
|
|
permissions: |
|
|
|
|
contents: read |
|
|
|
|
id-token: write |
|
|
|
|
|
|
|
|
|
jobs: |
|
|
|
|
lint-frontend-verify-i18n: |
|
|
|
|
name: Verify i18n |
|
|
|
|
@ -30,6 +34,24 @@ jobs: |
|
|
|
|
exit 1 |
|
|
|
|
fi |
|
|
|
|
lint-frontend-prettier: |
|
|
|
|
# Run this workflow only for PRs from forks; if it gets merged into `main` or `release-*`, |
|
|
|
|
# the `lint-frontend-prettier-enterprise` workflow will run instead |
|
|
|
|
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true |
|
|
|
|
name: Lint |
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
steps: |
|
|
|
|
- uses: actions/checkout@v4 |
|
|
|
|
- uses: actions/setup-node@v4 |
|
|
|
|
with: |
|
|
|
|
node-version-file: '.nvmrc' |
|
|
|
|
cache: 'yarn' |
|
|
|
|
cache-dependency-path: 'yarn.lock' |
|
|
|
|
- run: yarn install --immutable --check-cache |
|
|
|
|
- run: yarn run prettier:check |
|
|
|
|
- run: yarn run lint |
|
|
|
|
lint-frontend-prettier-enterprise: |
|
|
|
|
# Run this workflow for non-PR events (like pushes to `main` or `release-*`) OR for internal PRs (PRs not from forks) |
|
|
|
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false |
|
|
|
|
name: Lint |
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
steps: |
|
|
|
|
@ -39,10 +61,17 @@ jobs: |
|
|
|
|
node-version-file: '.nvmrc' |
|
|
|
|
cache: 'yarn' |
|
|
|
|
cache-dependency-path: 'yarn.lock' |
|
|
|
|
- name: Setup Enterprise |
|
|
|
|
uses: ./.github/actions/setup-enterprise |
|
|
|
|
with: |
|
|
|
|
github-app-name: 'grafana-ci-bot' |
|
|
|
|
- run: yarn install --immutable --check-cache |
|
|
|
|
- run: yarn run prettier:check |
|
|
|
|
- run: yarn run lint |
|
|
|
|
lint-frontend-typecheck: |
|
|
|
|
# Run this workflow only for PRs from forks; if it gets merged into `main` or `release-*`, |
|
|
|
|
# the `lint-frontend-typecheck-enterprise` workflow will run instead |
|
|
|
|
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true |
|
|
|
|
name: Typecheck |
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
steps: |
|
|
|
|
@ -54,6 +83,24 @@ jobs: |
|
|
|
|
cache-dependency-path: 'yarn.lock' |
|
|
|
|
- run: yarn install --immutable --check-cache |
|
|
|
|
- run: yarn run typecheck |
|
|
|
|
lint-frontend-typecheck-enterprise: |
|
|
|
|
# Run this workflow for non-PR events (like pushes to `main` or `release-*`) OR for internal PRs (PRs not from forks) |
|
|
|
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false |
|
|
|
|
name: Typecheck |
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
steps: |
|
|
|
|
- uses: actions/checkout@v4 |
|
|
|
|
- uses: actions/setup-node@v4 |
|
|
|
|
with: |
|
|
|
|
node-version-file: '.nvmrc' |
|
|
|
|
cache: 'yarn' |
|
|
|
|
cache-dependency-path: 'yarn.lock' |
|
|
|
|
- name: Setup Enterprise |
|
|
|
|
uses: ./.github/actions/setup-enterprise |
|
|
|
|
with: |
|
|
|
|
github-app-name: 'grafana-ci-bot' |
|
|
|
|
- run: yarn install --immutable --check-cache |
|
|
|
|
- run: yarn run typecheck |
|
|
|
|
lint-frontend-betterer: |
|
|
|
|
name: Betterer |
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
|