|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - main |
| 10 | +# Cancel in progress workflows |
| 11 | +# in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run |
| 12 | +concurrency: |
| 13 | + group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" |
| 14 | + cancel-in-progress: true |
| 15 | +permissions: |
| 16 | + contents: read |
| 17 | + |
| 18 | +jobs: |
| 19 | + test: |
| 20 | + name: Test - ${{ matrix.os }} (Node.js ${{ matrix.node-version }}) |
| 21 | + |
| 22 | + strategy: |
| 23 | + fail-fast: false |
| 24 | + matrix: |
| 25 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 26 | + node-version: [24] |
| 27 | + |
| 28 | + runs-on: ${{ matrix.os }} |
| 29 | + |
| 30 | + steps: |
| 31 | + - name: Checkout code |
| 32 | + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
| 33 | + |
| 34 | + - name: Setup Node.js ${{ matrix.node-version }} |
| 35 | + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 |
| 36 | + with: |
| 37 | + node-version: ${{ matrix.node-version }} |
| 38 | + cache: "npm" |
| 39 | + |
| 40 | + - name: Install dependencies |
| 41 | + run: npm ci |
| 42 | + |
| 43 | + - name: Link webpack-dev-server |
| 44 | + run: | |
| 45 | + cp -R client tmp-client |
| 46 | + npm link --ignore-scripts |
| 47 | + npm link webpack-dev-server --ignore-scripts |
| 48 | + rm -r client |
| 49 | + cp -R tmp-client client |
| 50 | +
|
| 51 | + - name: Run tests |
| 52 | + run: npm run test:only -- --updateSnapshot |
| 53 | + |
| 54 | + - name: Create Pull Request |
| 55 | + uses: gr2m/create-or-update-pull-request-action@v1 |
| 56 | + env: |
| 57 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 58 | + with: |
| 59 | + commit-message: 'docs: update external docs' |
| 60 | + title: 'docs: update external docs' |
| 61 | + body: > |
| 62 | + This auto-generated PR updates external documentation to the expressjs.com repository. |
| 63 | +
|
| 64 | + cc: @expressjs/docs-wg |
| 65 | + labels: docs |
| 66 | + branch: external-docs |
0 commit comments