mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 10:59:02 +08:00
ci: tsc and commitci workflows (#7269)
### Summary - tsc and commitci workflows
This commit is contained in:
parent
239ea9d34c
commit
1224a03229
10
.github/workflows/build.yaml
vendored
10
.github/workflows/build.yaml
vendored
@ -7,13 +7,6 @@ on:
|
|||||||
- release/v*
|
- release/v*
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-no-ee-references:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Run check
|
|
||||||
run: make check-no-ee-references
|
|
||||||
|
|
||||||
build-frontend:
|
build-frontend:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@ -21,9 +14,6 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: cd frontend && yarn install
|
run: cd frontend && yarn install
|
||||||
- name: TSC
|
|
||||||
run: yarn i18n:generate-hash && yarn tsc
|
|
||||||
working-directory: ./frontend
|
|
||||||
- name: Build frontend docker image
|
- name: Build frontend docker image
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
39
.github/workflows/commitci.yaml
vendored
Normal file
39
.github/workflows/commitci.yaml
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
name: commitci
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- labeled
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
refcheck:
|
||||||
|
if: |
|
||||||
|
(github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) ||
|
||||||
|
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test'))
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: check
|
||||||
|
run: |
|
||||||
|
if grep -R --include="*.go" '.*/ee/.*' pkg/; then
|
||||||
|
echo "Error: Found references to 'ee' packages in 'pkg' directory"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "No references to 'ee' packages found in 'pkg' directory"
|
||||||
|
fi
|
||||||
|
lint:
|
||||||
|
if: |
|
||||||
|
(github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) ||
|
||||||
|
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test'))
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: lint
|
||||||
|
uses: wagoid/commitlint-github-action@v5
|
13
.github/workflows/commitlint.yml
vendored
13
.github/workflows/commitlint.yml
vendored
@ -1,13 +0,0 @@
|
|||||||
name: commitlint
|
|
||||||
on: [pull_request]
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: frontend
|
|
||||||
jobs:
|
|
||||||
lint-commits:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- uses: wagoid/commitlint-github-action@v5
|
|
12
.github/workflows/jsci.yaml
vendored
12
.github/workflows/jsci.yaml
vendored
@ -9,6 +9,18 @@ on:
|
|||||||
- labeled
|
- labeled
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
tsc:
|
||||||
|
if: |
|
||||||
|
(github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) ||
|
||||||
|
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test'))
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: install
|
||||||
|
run: cd frontend && yarn install
|
||||||
|
- name: tsc
|
||||||
|
run: cd frontend && yarn tsc
|
||||||
test:
|
test:
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) ||
|
(github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) ||
|
||||||
|
6
.github/workflows/remove-label.yaml
vendored
6
.github/workflows/remove-label.yaml
vendored
@ -8,12 +8,6 @@ jobs:
|
|||||||
remove:
|
remove:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Remove label ok-to-test from PR
|
|
||||||
uses: buildsville/add-remove-label@v2.0.0
|
|
||||||
with:
|
|
||||||
label: ok-to-test
|
|
||||||
type: remove
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Remove label testing-deploy from PR
|
- name: Remove label testing-deploy from PR
|
||||||
uses: buildsville/add-remove-label@v2.0.0
|
uses: buildsville/add-remove-label@v2.0.0
|
||||||
with:
|
with:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user