Add ERNIE CI #5
Workflow file for this run
This file contains hidden or 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: Test | |
| on: [push, pull_request] | |
| jobs: | |
| Test: | |
| name: Test | |
| runs-on: [self-hosted, 4gpu] | |
| steps: | |
| - name: Get Repo | |
| env: | |
| ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16 | |
| ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 | |
| ACTIONS_ALLOW_UNSECURE_NODE_VERSION: true | |
| uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - name: checkout develop | |
| run: | | |
| if ! git show-ref --quiet refs/heads/develop; then \ | |
| echo "local develop branch is missing, creating local develop branch that tracks remote develop branch" | |
| git fetch origin develop | |
| git branch develop --track origin/develop | |
| else | |
| echo "local develop branch exist, skipping" | |
| fi | |
| - name: Start container | |
| run: | | |
| if [ ! "$(docker ps -q -f name=ERNIE_CI_Container)" ]; then | |
| echo "Starting container ERNIE_CI_Container" | |
| docker start ERNIE_CI_Container | |
| else | |
| echo "ERNIE_CI_Container already running" | |
| fi | |
| - name: Install dependencies | |
| run: docker exec -t ERNIE_CI_Container /bin/bash -c ' | |
| make install' | |
| - name: Runing case | |
| run: docker exec -t ERNIE_CI_Container /bin/bash -c ' | |
| make test' |