fix cannot build with react 18 by yarn (#100) #326
This file contains 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
name: github | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
branches: | |
- '**' | |
workflow_dispatch: | |
jobs: | |
test: | |
environment: Production | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install Dependencies | |
run: npm install | |
- name: Build and Start Next.js | |
run: npm run build && (npm run start&) > /dev/null | |
- name: Run Tests | |
run: npm run test |