diff --git a/.github/workflows/test-tools.yml b/.github/workflows/test-tools-integ.yml similarity index 78% rename from .github/workflows/test-tools.yml rename to .github/workflows/test-tools-integ.yml index eed811e1d..fb63fd94b 100644 --- a/.github/workflows/test-tools.yml +++ b/.github/workflows/test-tools-integ.yml @@ -1,4 +1,4 @@ -name: Test Tools +name: Test Tools (Integration) on: push: @@ -9,6 +9,7 @@ on: - 'jest.config.js' - 'tsconfig.json' - 'tools/**' + - '.github/workflows/test-tools*.yml' pull_request: branches: ['**'] paths: @@ -17,6 +18,7 @@ on: - 'jest.config.js' - 'tsconfig.json' - 'tools/**' + - '.github/workflows/test-tools*.yml' jobs: test: @@ -43,8 +45,9 @@ jobs: - name: Install Dependencies run: npm install - - name: Lint - run: npm run lint - - name: Tests - run: npm run test + run: | + npm run test:integ -- --coverage + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 \ No newline at end of file diff --git a/.github/workflows/test-tools-unit.yml b/.github/workflows/test-tools-unit.yml new file mode 100644 index 000000000..46a69bf34 --- /dev/null +++ b/.github/workflows/test-tools-unit.yml @@ -0,0 +1,46 @@ +name: Test Tools (Unit) + +on: + push: + branches: ['**'] + paths: + - 'package*.json' + - 'eslint.config.mjs' + - 'jest.config.js' + - 'tsconfig.json' + - 'tools/**' + - '.github/workflows/test-tools*.yml' + pull_request: + branches: ['**'] + paths: + - 'package*.json' + - 'eslint.config.mjs' + - 'jest.config.js' + - 'tsconfig.json' + - 'tools/**' + - '.github/workflows/test-tools*.yml' + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + + - name: Install Dependencies + run: npm install + + - name: Lint + run: npm run lint + + - name: Tests + run: | + npm run test:unit -- --coverage + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 \ No newline at end of file diff --git a/.gitignore b/.gitignore index c16dd7893..a4d81cb31 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,8 @@ node_modules _site/ # build output -build/ \ No newline at end of file +build/ + +# coverage output +coverage/ +