Merge branch 'master' of github.com:opentripplanner/otp-ui #4411
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jobs: | |
| test-build-release: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| persist-credentials: false | |
| - uses: pnpm/action-setup@v2 | |
| with: | |
| version: 10 | |
| - name: Use Node.js 22.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Lint code | |
| run: pnpm run lint:js | |
| - name: Lint styles | |
| run: pnpm run lint:styles | |
| - name: Build packages | |
| run: pnpm run build:cjs && pnpm run build:esm | |
| - name: i18n check (en-US, fr only) | |
| run: pnpm run check:i18n-en-fr | |
| - name: Type check | |
| run: pnpm run typescript | |
| - name: Run unit tests | |
| run: pnpm run unit | |
| - name: Build Storybook | |
| run: pnpm run build-storybook --quiet | |
| - name: Install Playwright | |
| run: pnpm exec playwright install --with-deps | |
| - name: Serve Storybook and run snapshot and a11y tests | |
| # We have to run the snapshot and a11y tests together | |
| # Because Jest will fail if there are obsolete snapshots | |
| # And you would get obsolete snapshots from running the a11y tests alone | |
| # env: | |
| # ONLY_RUN: SNAPSHOTS | |
| run: | | |
| npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ | |
| "npx http-server storybook-static --port 5555 --silent" \ | |
| "npx wait-on tcp:5555 && pnpm run test-storybook --ci" | |
| # - name: Serve Storybook and run a11y tests | |
| # env: | |
| # ONLY_RUN: A11Y | |
| # run: | | |
| # npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ | |
| # "npx http-server storybook-static --port 5555 --silent" \ | |
| # "npx wait-on tcp:5555 && pnpm run test-storybook --ci" | |
| - env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| name: Semantic Release | |
| run: | | |
| echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | |
| echo "@OpenTripPlanner:registry=https://registry.npmjs.org/" >> ~/.npmrc | |
| pnpm run semantic-release | |
| name: Node.js CI | |
| "on": | |
| pull_request: null | |
| push: | |
| branches: | |
| - master | |
| - alpha | |
| - beta | |
| - next | |
| - next-major | |
| - "[0-9]+.[0-9]+.x" | |
| - "[0-9]+.x.x" | |
| - "[0-9]+.x" |