|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: ['**'] |
| 6 | + pull_request: |
| 7 | + branches: ['**'] |
| 8 | + |
| 9 | +jobs: |
| 10 | + lint: |
| 11 | + name: Lint |
| 12 | + runs-on: ubuntu-latest |
| 13 | + |
| 14 | + steps: |
| 15 | + - name: Checkout |
| 16 | + uses: actions/checkout@v4 |
| 17 | + |
| 18 | + - name: Setup Node.js |
| 19 | + uses: actions/setup-node@v4 |
| 20 | + with: |
| 21 | + node-version: '20.17.0' |
| 22 | + cache: 'yarn' |
| 23 | + |
| 24 | + - name: Install dependencies |
| 25 | + run: yarn install --frozen-lockfile |
| 26 | + |
| 27 | + - name: Run ESLint |
| 28 | + run: yarn eslint |
| 29 | + |
| 30 | + - name: Run Prettier check |
| 31 | + run: yarn prettier-eslint --list-different |
| 32 | + |
| 33 | + test: |
| 34 | + name: Test |
| 35 | + runs-on: ubuntu-latest |
| 36 | + |
| 37 | + steps: |
| 38 | + - name: Checkout |
| 39 | + uses: actions/checkout@v4 |
| 40 | + |
| 41 | + - name: Setup Node.js |
| 42 | + uses: actions/setup-node@v4 |
| 43 | + with: |
| 44 | + node-version: '20.17.0' |
| 45 | + cache: 'yarn' |
| 46 | + |
| 47 | + - name: Install dependencies |
| 48 | + run: yarn install --frozen-lockfile |
| 49 | + |
| 50 | + - name: Run tests |
| 51 | + run: yarn test |
| 52 | + |
| 53 | + e2e: |
| 54 | + name: E2E Tests |
| 55 | + runs-on: ubuntu-latest |
| 56 | + |
| 57 | + steps: |
| 58 | + - name: Checkout |
| 59 | + uses: actions/checkout@v4 |
| 60 | + |
| 61 | + - name: Setup Node.js |
| 62 | + uses: actions/setup-node@v4 |
| 63 | + with: |
| 64 | + node-version: '20.17.0' |
| 65 | + cache: 'yarn' |
| 66 | + |
| 67 | + - name: Install dependencies |
| 68 | + run: yarn install --frozen-lockfile |
| 69 | + |
| 70 | + - name: Install Playwright Browsers |
| 71 | + run: npx playwright install --with-deps |
| 72 | + |
| 73 | + - name: Run E2E tests |
| 74 | + run: yarn test:e2e |
| 75 | + |
| 76 | + - name: Upload test results |
| 77 | + if: always() |
| 78 | + uses: actions/upload-artifact@v4 |
| 79 | + with: |
| 80 | + name: playwright-test-results |
| 81 | + path: e2e/test-results/ |
| 82 | + retention-days: 7 |
| 83 | + |
| 84 | + - name: Upload Playwright report |
| 85 | + if: always() |
| 86 | + uses: actions/upload-artifact@v4 |
| 87 | + with: |
| 88 | + name: playwright-report |
| 89 | + path: e2e/playwright-report/ |
| 90 | + retention-days: 7 |
| 91 | + |
| 92 | + docs: |
| 93 | + name: Build Documentation |
| 94 | + runs-on: ubuntu-latest |
| 95 | + |
| 96 | + steps: |
| 97 | + - name: Checkout |
| 98 | + uses: actions/checkout@v4 |
| 99 | + |
| 100 | + - name: Install documentation dependencies |
| 101 | + run: sudo apt-get update -yq && sudo apt install -yq pandoc emacs |
| 102 | + |
| 103 | + - name: Compile documentation |
| 104 | + run: ./bin/compile_doc.sh |
| 105 | + |
| 106 | + - name: Upload documentation |
| 107 | + uses: actions/upload-artifact@v4 |
| 108 | + with: |
| 109 | + name: documentation |
| 110 | + path: documentation.html |
| 111 | + retention-days: 7 |
0 commit comments