| @@ -8,27 +8,30 @@ on: | |||||
| jobs: | jobs: | ||||
| check-commit: | check-commit: | ||||
| runs-on: ubuntu-latest | runs-on: ubuntu-latest | ||||
| if: ${{ github.event.pull_request }} | |||||
| steps: | steps: | ||||
| - uses: actions/checkout@v2.3.1 | - uses: actions/checkout@v2.3.1 | ||||
| with: | with: | ||||
| fetch-depth: 0 | fetch-depth: 0 | ||||
| - uses: actions/setup-node@v2.1.0 | - uses: actions/setup-node@v2.1.0 | ||||
| - run: yarn add @commitlint/config-conventional @commitlint/cli | |||||
| - run: yarn commitlint --from ${{ github.event.pull_request.base.sha }} --to HEAD | |||||
| - name: Check commit | |||||
| if: ${{ github.event.pull_request }} | |||||
| run: | | |||||
| yarn add @commitlint/config-conventional @commitlint/cli | |||||
| yarn commitlint --from ${{ github.event.pull_request.base.sha }} --to HEAD | |||||
| check-format: | check-format: | ||||
| runs-on: ubuntu-latest | runs-on: ubuntu-latest | ||||
| if: ${{ github.event.pull_request }} | |||||
| steps: | steps: | ||||
| - uses: actions/checkout@v2.3.1 | - uses: actions/checkout@v2.3.1 | ||||
| with: | with: | ||||
| fetch-depth: 0 | fetch-depth: 0 | ||||
| - name: Set up Python | - name: Set up Python | ||||
| if: ${{ github.event.pull_request }} | |||||
| uses: actions/setup-python@v2 | uses: actions/setup-python@v2 | ||||
| with: | with: | ||||
| python-version: 3.6 | python-version: 3.6 | ||||
| - name: Cache pip | - name: Cache pip | ||||
| if: ${{ github.event.pull_request }} | |||||
| uses: actions/cache@v2 | uses: actions/cache@v2 | ||||
| with: | with: | ||||
| # This path is specific to Ubuntu | # This path is specific to Ubuntu | ||||
| @@ -39,9 +42,11 @@ jobs: | |||||
| ${{ runner.os }}-pip- | ${{ runner.os }}-pip- | ||||
| ${{ runner.os }}- | ${{ runner.os }}- | ||||
| - name: Install dependencies | - name: Install dependencies | ||||
| if: ${{ github.event.pull_request }} | |||||
| run: | | run: | | ||||
| python -m pip install --upgrade pip | python -m pip install --upgrade pip | ||||
| - name: Check format | - name: Check format | ||||
| if: ${{ github.event.pull_request }} | |||||
| run: | | run: | | ||||
| ./ci/run_format_check.sh | ./ci/run_format_check.sh | ||||