mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-13 06:09:02 +08:00
parent
494d2460a0
commit
239ea9d34c
29
.github/workflows/build.yaml
vendored
29
.github/workflows/build.yaml
vendored
@ -21,35 +21,8 @@ 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: Run ESLint
|
|
||||||
run: cd frontend && npm run lint
|
|
||||||
- name: Run Jest
|
|
||||||
run: cd frontend && npm run jest
|
|
||||||
- name: TSC
|
- name: TSC
|
||||||
run: yarn tsc
|
run: yarn i18n:generate-hash && yarn tsc
|
||||||
working-directory: ./frontend
|
|
||||||
- name: Build frontend docker image
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
make build-frontend-amd64
|
|
||||||
|
|
||||||
build-frontend-ee:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Create .env file
|
|
||||||
run: |
|
|
||||||
echo 'INTERCOM_APP_ID="${{ secrets.INTERCOM_APP_ID }}"' > frontend/.env
|
|
||||||
echo 'SEGMENT_ID="${{ secrets.SEGMENT_ID }}"' >> frontend/.env
|
|
||||||
- name: Install dependencies
|
|
||||||
run: cd frontend && yarn install
|
|
||||||
- name: Run ESLint
|
|
||||||
run: cd frontend && npm run lint
|
|
||||||
- name: Run Jest
|
|
||||||
run: cd frontend && npm run jest
|
|
||||||
- name: TSC
|
|
||||||
run: yarn tsc
|
|
||||||
working-directory: ./frontend
|
working-directory: ./frontend
|
||||||
- name: Build frontend docker image
|
- name: Build frontend docker image
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
name: ci
|
name: goci
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
38
.github/workflows/jsci.yaml
vendored
Normal file
38
.github/workflows/jsci.yaml
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
name: jsci
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- labeled
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
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'))
|
||||||
|
uses: signoz/primus.workflows/.github/workflows/js-test.yaml@main
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
PRIMUS_REF: main
|
||||||
|
JS_SRC: frontend
|
||||||
|
fmt:
|
||||||
|
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'))
|
||||||
|
uses: signoz/primus.workflows/.github/workflows/js-fmt.yaml@main
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
PRIMUS_REF: main
|
||||||
|
JS_SRC: frontend
|
||||||
|
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'))
|
||||||
|
uses: signoz/primus.workflows/.github/workflows/js-lint.yaml@main
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
PRIMUS_REF: main
|
||||||
|
JS_SRC: frontend
|
@ -5,22 +5,23 @@
|
|||||||
"main": "webpack.config.js",
|
"main": "webpack.config.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"i18n:generate-hash": "node ./i18-generate-hash.js",
|
"i18n:generate-hash": "node ./i18-generate-hash.js",
|
||||||
"dev": "npm run i18n:generate-hash && cross-env NODE_ENV=development webpack serve --progress",
|
"dev": "cross-env NODE_ENV=development webpack serve --progress",
|
||||||
"build": "npm run i18n:generate-hash && webpack --config=webpack.config.prod.js --progress",
|
"build": "webpack --config=webpack.config.prod.js --progress",
|
||||||
"prettify": "prettier --write .",
|
"prettify": "prettier --write .",
|
||||||
"lint": "npm run i18n:generate-hash && eslint ./src",
|
"fmt": "prettier --check .",
|
||||||
"lint:fix": "npm run i18n:generate-hash && eslint ./src --fix",
|
"lint": "eslint ./src",
|
||||||
|
"lint:fix": "eslint ./src --fix",
|
||||||
"jest": "jest",
|
"jest": "jest",
|
||||||
"jest:coverage": "jest --coverage",
|
"jest:coverage": "jest --coverage",
|
||||||
"jest:watch": "jest --watch",
|
"jest:watch": "jest --watch",
|
||||||
"postinstall": "is-ci || yarn husky:configure",
|
"postinstall": "yarn i18n:generate-hash && (is-ci || yarn husky:configure)",
|
||||||
"playwright": "npm run i18n:generate-hash && NODE_ENV=testing playwright test --config=./playwright.config.ts",
|
"playwright": "NODE_ENV=testing playwright test --config=./playwright.config.ts",
|
||||||
"playwright:local:debug": "PWDEBUG=console yarn playwright --headed --browser=chromium",
|
"playwright:local:debug": "PWDEBUG=console yarn playwright --headed --browser=chromium",
|
||||||
"playwright:codegen:local": "playwright codegen http://localhost:3301",
|
"playwright:codegen:local": "playwright codegen http://localhost:3301",
|
||||||
"playwright:codegen:local:auth": "yarn playwright:codegen:local --load-storage=tests/auth.json",
|
"playwright:codegen:local:auth": "yarn playwright:codegen:local --load-storage=tests/auth.json",
|
||||||
"husky:configure": "cd .. && husky install frontend/.husky && cd frontend && chmod ug+x .husky/*",
|
"husky:configure": "cd .. && husky install frontend/.husky && cd frontend && chmod ug+x .husky/*",
|
||||||
"commitlint": "commitlint --edit $1",
|
"commitlint": "commitlint --edit $1",
|
||||||
"test": "jest --coverage",
|
"test": "jest",
|
||||||
"test:changedsince": "jest --changedSince=main --coverage --silent"
|
"test:changedsince": "jest --changedSince=main --coverage --silent"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user