|
| 1 | +on: |
| 2 | + push: |
| 3 | + branches: [main] |
| 4 | + pull_request: |
| 5 | + paths: |
| 6 | + - site/** |
| 7 | + |
| 8 | +name: Code Review |
| 9 | + |
| 10 | +permissions: |
| 11 | + contents: read |
| 12 | + |
| 13 | +env: |
| 14 | + OBSERVABLE_TELEMETRY_DISABLE: true |
| 15 | + SENTRY_RELEASE: ${{ github.sha }} |
| 16 | + SENTRY_ENVIRONMENT: test |
| 17 | + SENTRY_PUBLIC_KEY: test |
| 18 | + |
| 19 | +jobs: |
| 20 | + build: |
| 21 | + name: Build |
| 22 | + runs-on: ubuntu-24.04 |
| 23 | + timeout-minutes: 10 |
| 24 | + |
| 25 | + defaults: |
| 26 | + run: |
| 27 | + working-directory: site |
| 28 | + |
| 29 | + steps: |
| 30 | + - uses: actions/checkout@v4 |
| 31 | + |
| 32 | + - run: pipx install poetry~=1.8 |
| 33 | + - uses: actions/setup-python@v5 |
| 34 | + with: |
| 35 | + python-version: "3.13" |
| 36 | + cache: poetry |
| 37 | + cache-dependency-path: site/poetry.lock |
| 38 | + - uses: actions/setup-node@v4 |
| 39 | + with: |
| 40 | + node-version: "20" |
| 41 | + cache-dependency-path: site/package-lock.json |
| 42 | + |
| 43 | + - run: poetry install |
| 44 | + - run: poetry run npm ci --omit=dev |
| 45 | + - run: poetry run npm run build |
| 46 | + |
| 47 | + audit: |
| 48 | + name: Audit |
| 49 | + runs-on: ubuntu-24.04 |
| 50 | + timeout-minutes: 10 |
| 51 | + |
| 52 | + defaults: |
| 53 | + run: |
| 54 | + working-directory: site |
| 55 | + |
| 56 | + steps: |
| 57 | + - uses: actions/checkout@v4 |
| 58 | + |
| 59 | + - uses: actions/setup-node@v4 |
| 60 | + with: |
| 61 | + node-version: "20" |
| 62 | + cache-dependency-path: site/package-lock.json |
| 63 | + |
| 64 | + - run: npm audit |
| 65 | + |
| 66 | + lint: |
| 67 | + name: Lint |
| 68 | + runs-on: ubuntu-24.04 |
| 69 | + timeout-minutes: 10 |
| 70 | + |
| 71 | + defaults: |
| 72 | + run: |
| 73 | + working-directory: site |
| 74 | + |
| 75 | + steps: |
| 76 | + - uses: actions/checkout@v4 |
| 77 | + |
| 78 | + - run: pipx install poetry~=1.8 |
| 79 | + - uses: actions/setup-python@v5 |
| 80 | + with: |
| 81 | + python-version: "3.13" |
| 82 | + cache: poetry |
| 83 | + cache-dependency-path: site/poetry.lock |
| 84 | + - uses: actions/setup-node@v4 |
| 85 | + with: |
| 86 | + node-version: "20" |
| 87 | + cache-dependency-path: site/package-lock.json |
| 88 | + |
| 89 | + - run: poetry install |
| 90 | + - run: poetry run npm ci |
| 91 | + - run: poetry run npm run lint |
| 92 | + |
| 93 | + test: |
| 94 | + name: Test |
| 95 | + runs-on: ubuntu-24.04 |
| 96 | + timeout-minutes: 30 |
| 97 | + |
| 98 | + defaults: |
| 99 | + run: |
| 100 | + working-directory: site |
| 101 | + |
| 102 | + steps: |
| 103 | + - uses: actions/checkout@v4 |
| 104 | + |
| 105 | + - run: pipx install poetry~=1.8 |
| 106 | + - uses: actions/setup-python@v5 |
| 107 | + with: |
| 108 | + python-version: "3.13" |
| 109 | + cache: poetry |
| 110 | + cache-dependency-path: site/poetry.lock |
| 111 | + - uses: actions/setup-node@v4 |
| 112 | + with: |
| 113 | + node-version: "20" |
| 114 | + cache-dependency-path: site/package-lock.json |
| 115 | + |
| 116 | + - run: poetry install |
| 117 | + - run: poetry run npm ci |
| 118 | + - run: poetry run npx playwright install --with-deps chromium |
| 119 | + - run: poetry run npm run test |
| 120 | + |
| 121 | + - uses: actions/upload-artifact@v4 |
| 122 | + if: always() |
| 123 | + with: |
| 124 | + name: playwright-report |
| 125 | + path: site/playwright-report/ |
| 126 | + retention-days: 7 |
0 commit comments