diff --git a/.github/workflows/github-pages-deploy.yml b/.github/workflows/github-pages-deploy.yml index 9628de8..9a760bf 100644 --- a/.github/workflows/github-pages-deploy.yml +++ b/.github/workflows/github-pages-deploy.yml @@ -15,8 +15,12 @@ concurrency: cancel-in-progress: false jobs: + test: + uses: ./.github/workflows/test.yml + build: runs-on: ubuntu-latest + needs: [test] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..5fc54de --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,30 @@ +name: Lint + +on: + pull_request: + branches: + - main + - dev + workflow_call: + +permissions: + contents: read + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "24" + cache: "npm" + + - name: Install dependencies + run: npm ci + + - name: Run lint + run: npm run lint diff --git a/.github/workflows/netlify-deploy.yml b/.github/workflows/netlify-deploy.yml index dea8c6b..df192b8 100644 --- a/.github/workflows/netlify-deploy.yml +++ b/.github/workflows/netlify-deploy.yml @@ -4,6 +4,10 @@ on: branches: - main +concurrency: + group: netlify-production + cancel-in-progress: false + jobs: call-test: uses: ./.github/workflows/test.yml diff --git a/.github/workflows/quality-checks.yml b/.github/workflows/quality-checks.yml new file mode 100644 index 0000000..f03a87b --- /dev/null +++ b/.github/workflows/quality-checks.yml @@ -0,0 +1,16 @@ +name: Quality Checks + +on: + pull_request: + branches: + - main + - dev + +permissions: {} + +jobs: + test: + uses: ./.github/workflows/test.yml + + lint: + uses: ./.github/workflows/lint.yml diff --git a/.github/workflows/security-audit.yml b/.github/workflows/security-audit.yml new file mode 100644 index 0000000..594fd47 --- /dev/null +++ b/.github/workflows/security-audit.yml @@ -0,0 +1,34 @@ +name: Security Audit + +on: + pull_request: + branches: + - main + - dev + schedule: + - cron: '0 0 * * 0' + +permissions: + contents: read + +jobs: + security-audit: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "24" + cache: "npm" + + - name: Install dependencies + run: npm ci + + - name: Run security audit + run: npm audit --audit-level=moderate + + - name: Check for outdated dependencies + run: npm outdated || true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ce61485..72841e3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,3 +25,6 @@ jobs: - name: Run tests run: npm test + + - name: Verify build + run: npm run build