diff --git a/.github/workflows/lint-and-format.yml b/.github/workflows/lint-and-format.yml new file mode 100644 index 0000000..58582fe --- /dev/null +++ b/.github/workflows/lint-and-format.yml @@ -0,0 +1,25 @@ +name: Lint and Format + +on: + pull_request: + branches: [main] + +jobs: + check: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20.x] + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Check Linter + run: yarn lint:check + - name: Check Formatting + run: yarn format:check diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..c28b69e --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,25 @@ +name: Run Tests + +on: + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x, 20.x] + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Build Core + run: yarn build:core + - name: Run Tests + run: yarn test diff --git a/.husky/pre-commit b/.husky/pre-commit index 0b299d7..464bb48 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,3 +1,3 @@ -npm test +yarn test npx lint-staged \ No newline at end of file diff --git a/package.json b/package.json index 3d51aa0..440a3df 100644 --- a/package.json +++ b/package.json @@ -52,4 +52,4 @@ "*.{ts,tsx}": "eslint --cache --fix", "*.{js,css,md,ts,tsx,yml}": "prettier --write" } -} \ No newline at end of file +} diff --git a/packages/lexicon/package.json b/packages/lexicon/package.json index 8ba528a..031d465 100644 --- a/packages/lexicon/package.json +++ b/packages/lexicon/package.json @@ -29,4 +29,4 @@ "vite-plugin-dts": "^3.7.1", "vitest": "^1.2.1" } -} \ No newline at end of file +} diff --git a/packages/sdk-angular/package.json b/packages/sdk-angular/package.json index 452b2ff..97916bc 100644 --- a/packages/sdk-angular/package.json +++ b/packages/sdk-angular/package.json @@ -36,4 +36,4 @@ "ng-packagr": "^17.2.0", "typescript": "~5.3.2" } -} \ No newline at end of file +} diff --git a/packages/sdk-angular/projects/fusionauth-angular-sdk/package.json b/packages/sdk-angular/projects/fusionauth-angular-sdk/package.json index 72aedf2..46adab2 100644 --- a/packages/sdk-angular/projects/fusionauth-angular-sdk/package.json +++ b/packages/sdk-angular/projects/fusionauth-angular-sdk/package.json @@ -10,4 +10,4 @@ "tslib": "^2.3.0" }, "sideEffects": false -} \ No newline at end of file +} diff --git a/packages/sdk-react/package.json b/packages/sdk-react/package.json index ccbc3b7..86ee653 100644 --- a/packages/sdk-react/package.json +++ b/packages/sdk-react/package.json @@ -57,4 +57,4 @@ "vite-plugin-dts": "^3.7.3", "vitest": "^1.3.1" } -} \ No newline at end of file +} diff --git a/packages/sdk-vue/web-types.json b/packages/sdk-vue/web-types.json index 77b1e88..c6ed038 100644 --- a/packages/sdk-vue/web-types.json +++ b/packages/sdk-vue/web-types.json @@ -105,4 +105,4 @@ ] } } -} \ No newline at end of file +}