Skip to content

Bump @types/jest from 29.5.6 to 29.5.7 (#286) #656

Bump @types/jest from 29.5.6 to 29.5.7 (#286)

Bump @types/jest from 29.5.6 to 29.5.7 (#286) #656

Workflow file for this run

# https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
pull-requests: write # for comments in PRs
jobs:
unitTest:
runs-on: ubuntu-latest
steps:
- name: Get yarn cache dir
id: yarnCache
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-yarn
with:
path: ${{ steps.yarnCache.outputs.dir }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install
- name: Testing
run: |
yarn lint
yarn test
- name: Coveralls
uses: coverallsapp/github-action@v1
continue-on-error: true
with:
github-token: ${{ secrets.github_token }}
- name: Benchmark (show)
if: ${{ github.event_name == 'push' }}
run: yarn tsnode tools/benchmark.ts
- name: Benchmark (write)
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "# Performance benchmark" >> bench.txt
echo ${{ github.event.pull_request.head.sha }} >> bench.txt
echo '```' >> bench.txt
yarn tsnode tools/benchmark.ts >> bench.txt
echo '```' >> bench.txt
- name: Store results
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v3
with:
name: bench
path: bench.txt
comment:
needs: unitTest
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch benchmark results
uses: actions/download-artifact@v3
with:
name: bench
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: benchmark
- name: Create comment
if: steps.fc.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ github.event.pull_request.number }}
body-file: bench.txt
reactions: rocket
- name: Update comment
if: steps.fc.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
edit-mode: replace
body-file: bench.txt
reactions: hooray
integrationTest:
needs: unitTest
runs-on: ubuntu-latest
strategy:
matrix:
mui-version:
- 5.1.0
- 5.2.0
- 5.3.0
- 5.4.0
- 5.5.0
- 5.6.0
- 5.7.0
- 5.8.0
- 5.9.0
- 5.10.0
- 5.11.0
- 5.12.0
- 5.13.0
- 5.14.0
- latest
steps:
- name: Get yarn cache dir
id: yarnCache
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-yarn
with:
path: ${{ steps.yarnCache.outputs.dir }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build
- name: Test
env:
MUI_VERSION: ${{ matrix.mui-version }}
run: |
cat >integration-test/package.json <<EOF
{
"name": "integration-test",
"version": "1.0.0",
"license": "MIT",
"dependencies": {
"merge-sx": "./..",
"@mui/material": "${MUI_VERSION}",
"react": "^17.0.2",
"react-dom": "^17.0.2"
}
}
EOF
cat integration-test/package.json
yarn install --cwd=integration-test
yarn intTest