| @@ -19,40 +19,9 @@ jobs: | |||||
| yarn add @commitlint/config-conventional @commitlint/cli | yarn add @commitlint/config-conventional @commitlint/cli | ||||
| yarn commitlint --from ${{ github.event.pull_request.base.sha }} --to HEAD | yarn commitlint --from ${{ github.event.pull_request.base.sha }} --to HEAD | ||||
| check-format: | |||||
| runs-on: ubuntu-latest | |||||
| 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 | |||||
| path: ~/.cache/pip | |||||
| # Look to see if there is a cache hit for the corresponding requirements file | |||||
| key: ${{ runner.os }}-pip-${{ hashFiles('requires.txt') }} | |||||
| restore-keys: | | |||||
| ${{ 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 | |||||
| cpu-test: | cpu-test: | ||||
| runs-on: self-hosted | runs-on: self-hosted | ||||
| needs: [check-commit, check-format] | |||||
| needs: [check-commit] | |||||
| container: | container: | ||||
| image: localhost:5000/megengine-ci:latest | image: localhost:5000/megengine-ci:latest | ||||
| steps: | steps: | ||||
| @@ -75,7 +44,7 @@ jobs: | |||||
| run: ./ci/run_cpp_test.sh cpu | run: ./ci/run_cpp_test.sh cpu | ||||
| gpu-test: | gpu-test: | ||||
| runs-on: self-hosted | runs-on: self-hosted | ||||
| needs: [check-commit, check-format] | |||||
| needs: [check-commit] | |||||
| container: | container: | ||||
| image: localhost:5000/megengine-ci:latest | image: localhost:5000/megengine-ci:latest | ||||
| volumes: | volumes: | ||||