我想让GitHub CI
这个格式有什么问题?我有这样一个问题
无效的工作流文件您的yaml语法在第8行
有错误。
错误截图
name: Chart project CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
check-links:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [17.x]
steps:
uses: actions/checkout@v3
- name: Starting Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: install modules
- run: npm install
- name: build project
- run: npm build
- name: unit test
- run: npm test
附加信息
有一些缩进和语法问题。请在下面找到正确的代码。在这里你可以找到一个样本运行。链接
name: Test CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check-links:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [17.x]
steps:
- uses: actions/checkout@v3
- name: Starting Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: install modules
run: npm install
- name: build project
run: npm build
- name: unit test
run: npm test