diff --git a/.github/workflows/pr-test-build.yml b/.github/workflows/pr-test-build.yml new file mode 100644 index 00000000..3db8ea63 --- /dev/null +++ b/.github/workflows/pr-test-build.yml @@ -0,0 +1,23 @@ +name: BuildTests +on: + push: + branches: [master, develop] + pull_request: + branches: [master, develop] +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: "20" + - name: allow write in work dir + run: sudo chmod -R 777 . + - name: Install Dependencies + run: | + npm -g install pnpm + pnpm install + - name: Building niconicomments + run: pnpm build diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/pr-test-codeql-analysis.yml similarity index 100% rename from .github/workflows/codeql-analysis.yml rename to .github/workflows/pr-test-codeql-analysis.yml diff --git a/.github/workflows/pr-test-linter.yml b/.github/workflows/pr-test-linter.yml new file mode 100644 index 00000000..6f4822a1 --- /dev/null +++ b/.github/workflows/pr-test-linter.yml @@ -0,0 +1,23 @@ +name: LinterTests +on: + push: + branches: [master, develop] + pull_request: + branches: [master, develop] +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: "20" + - name: allow write in work dir + run: sudo chmod -R 777 . + - name: Install Dependencies + run: | + npm -g install pnpm + pnpm install + - name: Run Linter tests + run: pnpm lint diff --git a/.github/workflows/playwright.yml b/.github/workflows/pr-test-playwright.yml similarity index 93% rename from .github/workflows/playwright.yml rename to .github/workflows/pr-test-playwright.yml index f9b53a15..03a4c2da 100755 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/pr-test-playwright.yml @@ -19,9 +19,11 @@ jobs: run: | npm -g install pnpm pnpm install - pnpm build pnpm playwright install-deps pnpm playwright install firefox + - name: Building niconicomments + run: | + pnpm build - name: Run Playwright tests run: pnpm playwright test - uses: actions/upload-artifact@v3 diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/pr-test-reviewdog.yml similarity index 100% rename from .github/workflows/reviewdog.yml rename to .github/workflows/pr-test-reviewdog.yml diff --git a/.github/workflows/createDraftRelease.yml b/.github/workflows/release-createDraftRelease.yml similarity index 100% rename from .github/workflows/createDraftRelease.yml rename to .github/workflows/release-createDraftRelease.yml diff --git a/.github/workflows/publish-package.yml b/.github/workflows/release-publish-package.yml similarity index 100% rename from .github/workflows/publish-package.yml rename to .github/workflows/release-publish-package.yml diff --git a/.github/workflows/typedoc.yml b/.github/workflows/release-typedoc.yml similarity index 100% rename from .github/workflows/typedoc.yml rename to .github/workflows/release-typedoc.yml diff --git a/package.json b/package.json index f6ce6e6d..799799ad 100755 --- a/package.json +++ b/package.json @@ -14,9 +14,10 @@ "check-types": "npx tsc --noEmit --jsx react", "eslint": "eslint src/**/*.ts", "eslint:fix": "eslint src/**/*.ts --fix", - "format": "prettier --write \"src/**/*.{tsx,ts,js,json,css,scss}\"", - "lint": "npm run eslint&&npm run check-types", - "lint:fix": "npm run format&&npm run eslint:fix&&npm run check-types", + "format": "prettier --check \"src/**/*.{tsx,ts,js,json,css,scss}\"", + "format:fix": "prettier --write \"src/**/*.{tsx,ts,js,json,css,scss}\"", + "lint": "npm run format&&npm run eslint&&npm run check-types", + "lint:fix": "npm run format:fix&&npm run eslint:fix&&npm run check-types", "prepare": "husky install", "test": "docker-compose run --rm pw", "test-server": "http-server"