diff --git a/.github/workflows/pr-deps.yml b/.github/workflows/pr-deps.yml new file mode 100644 index 0000000..81787cc --- /dev/null +++ b/.github/workflows/pr-deps.yml @@ -0,0 +1,40 @@ +name: Deps Installer + +on: + pull_request: + branches: + - main + - develop + +jobs: + install-dependencies: + name: Install Dependencies + runs-on: ubuntu-latest + outputs: + cache-key: ${{ steps.cache-deps.outputs.cache-key }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '22' + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Upload node_modules as artifact + uses: actions/upload-artifact@v3 + with: + name: node_modules + path: node_modules + + - name: Upload yarn cache + id: cache-deps + uses: actions/cache@v3 + with: + path: | + ~/.cache/yarn + node_modules + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml new file mode 100644 index 0000000..822bdee --- /dev/null +++ b/.github/workflows/pr-lint.yml @@ -0,0 +1,39 @@ +name: Lint Runner + +on: + workflow_dispatch: + pull_request: + +jobs: + run-lint: + name: Run Lint + runs-on: ubuntu-latest + needs: install-dependencies + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Download node_modules artifact + uses: actions/download-artifact@v3 + with: + name: node_modules + path: node_modules + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '22' + + - name: Run lint + run: yarn lint + + - name: Lint Report + uses: dorny/test-reporter@v1 + if: success() + with: + name: Lint + + - name: Lint Summary + uses: test-summary/action@v2 + with: + paths: 'reports/lint.xml' diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml new file mode 100644 index 0000000..ed5a8b8 --- /dev/null +++ b/.github/workflows/pr-test.yml @@ -0,0 +1,41 @@ +name: Test Runner + +on: + workflow_dispatch: + pull_request: + +jobs: + run-tests: + name: Run Tests + runs-on: ubuntu-latest + needs: install-dependencies + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Download node_modules artifact + uses: actions/download-artifact@v3 + with: + name: node_modules + path: node_modules + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '22' + + - name: Run tests + run: yarn test + + - name: Test Report + uses: dorny/test-reporter@v1 + if: success() + with: + name: Tests + path: reports/junit.xml + reporter: jest-junit + + - name: Test Summary + uses: test-summary/action@v2 + with: + paths: 'reports/junit.xml' diff --git a/.github/workflows/pr-typecheck.yml b/.github/workflows/pr-typecheck.yml new file mode 100644 index 0000000..b498d82 --- /dev/null +++ b/.github/workflows/pr-typecheck.yml @@ -0,0 +1,39 @@ +name: Type Check Runner + +on: + workflow_dispatch: + pull_request: + +jobs: + run-typecheck: + name: Run Type Check + runs-on: ubuntu-latest + needs: install-dependencies + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Download node_modules artifact + uses: actions/download-artifact@v3 + with: + name: node_modules + path: node_modules + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '22' + + - name: Run type check + run: yarn typecheck + + - name: Type Check Report + uses: dorny/test-reporter@v1 + if: success() + with: + name: Type Check + + - name: Type Check Summary + uses: test-summary/action@v2 + with: + paths: 'reports/typecheck.xml'