Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FLAGSMITH_KEY=ser.LcTZxQgaRiAspBVAtjmgPB
10 changes: 5 additions & 5 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
* @alialaa
*.js @alialaa
*.ts @alialaa
*.tsx @alialaa
/e2e/ @alialaa17
* @anusuya-murugiah
*.js @anusuya-murugiah
*.ts @anusuya-murugiah
*.tsx @anusuya-murugiah
/e2e/ @anusuya-murugan
52 changes: 8 additions & 44 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,58 +1,41 @@
name: Test
on:
workflow_call:
on: workflow_call

jobs:
test-and-build:
Test-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node Environment
- name: setup the nodes
uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"
- name: Install Dependencies
run: npm ci
- name: Check for Formatting Errors
- name: check for formatting
run: npm run format
- name: Check for ESLint Errors
- name: check for ESLint errors
run: npm run lint
- name: Check for Type Errors
- name: check for type error
run: npm run typecheck
- name: Build Project
run: npm run build
- uses: actions/upload-artifact@v3
with:
name: build
path: .next/
- name: Run Unit Tests
- name: run unit tests
run: npm run test
- uses: actions/upload-artifact@v3
if: always()
with:
name: coverage
path: coverage/
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Store Playwright's Version
run: |
PLAYWRIGHT_VERSION=$(npm ls @playwright/test | grep @playwright | sed 's/.*@//')
echo "Playwright's Version: $PLAYWRIGHT_VERSION"
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV
- name: Cache Playwright Browsers
uses: actions/cache@v3
id: cache-playwright
with:
path: ~/.cache/ms-playwright
key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }}
- name: Install Playwright Browsers
if: steps.cache-playwright.outputs.cache-hit != 'true'
run: npx playwright install --with-deps
- name: Run E2E Tests
- name: run E2E Test
run: npm run test:e2e
env:
FLAGSMITH_KEY: ${{ secrets.FLAGSMITH_KEY }}
Expand All @@ -61,22 +44,3 @@ jobs:
with:
name: playwright-report
path: playwright-report/
- name: Send a Slack Message on Failure
uses: slackapi/slack-github-action@v1.24.0
if: failure()
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "🛑 *<https://github.com/${{github.repository}}/actions/runs/${{ github.run_id }}|${{ github.workflow }} workflow run>* failed."
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK