diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 986de41fbd61a6a29e950542b2ba3c739a398aa5..20d25543c34a5cff93b259d849b3e77d0812dd60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,27 +8,30 @@ on: jobs: check-commit: runs-on: ubuntu-latest - if: ${{ github.event.pull_request }} steps: - uses: actions/checkout@v2.3.1 with: fetch-depth: 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: runs-on: ubuntu-latest - if: ${{ github.event.pull_request }} steps: - uses: actions/checkout@v2.3.1 with: fetch-depth: 0 - name: Set up Python + if: ${{ github.event.pull_request }} uses: actions/setup-python@v2 with: python-version: 3.6 - name: Cache pip + if: ${{ github.event.pull_request }} uses: actions/cache@v2 with: # This path is specific to Ubuntu @@ -39,9 +42,11 @@ jobs: ${{ runner.os }}-pip- ${{ runner.os }}- - name: Install dependencies + if: ${{ github.event.pull_request }} run: | python -m pip install --upgrade pip - name: Check format + if: ${{ github.event.pull_request }} run: | ./ci/run_format_check.sh