fix: 修复"Workspaces can only be enabled in private projects"的报错 #10
Workflow file for this run
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: Jest | |
env: | |
ACTIONS_STEP_DEBUG: true | |
on: | |
pull_request: | |
branches: | |
- main | |
types: [opened, synchronize, reopened] | |
jobs: | |
jest: | |
runs-on: ubuntu-latest | |
steps: | |
# - name: Display debug information # to debug | |
# run: | | |
# echo "Current GitHub context:" | |
# echo "${{ toJson(github) }}" | |
- name: Checkout Branch | |
uses: actions/checkout@v4 | |
# with: | |
# ref: ${{github.head_ref }} | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
registry-url: "https://registry.npmjs.org" | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
with: | |
path: ~/.yarn/cache | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install Dependencies | |
run: npx yarn | |
- name: Run Jest | |
run: npx yarn test --coverage |