From 38cc980cd043c3ae1d3094322635637be8b7a512 Mon Sep 17 00:00:00 2001 From: ziyiwu9494 Date: Fri, 19 Feb 2021 16:53:40 -0800 Subject: [PATCH 1/8] Test running ci in containers --- .github/workflows/ci.yml | 308 +++++++++++++++++---------------------- 1 file changed, 131 insertions(+), 177 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5764155fa..994676d8ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,26 +97,20 @@ jobs: name: Check pre-commit runs-on: ubuntu-latest needs: build_docker_container + container: + image: docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} + credentials: + username: ${{ CI_USER }} + password: ${{ secrets.CI_REGISTRY_TOKEN }} + env: + MJKEY: MJKEY + PR_COMMIT_RANGE: PR_COMMIT_RANGE + options: --memory 6500m --memory-swap 6500m steps: - - name: Login to GitHub Package Registry - if: github.event_name == 'pull_request' || github.event_name == 'repository_dispatch' - run: echo ${{ secrets.CI_REGISTRY_TOKEN }} | docker login docker.pkg.github.com -u ${CI_USER} --password-stdin - - name: Pull from cache (GitHub Package Registry) - if: github.event_name == 'pull_request' || github.event_name == 'repository_dispatch' - run: docker pull "docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG}" - - name: Tag docker image - if: github.event_name == 'pull_request' || github.event_name == 'repository_dispatch' - run: docker tag docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} ${DOCKER_TAG} - name: Check pre-commit if: github.event_name == 'pull_request' || github.event_name == 'repository_dispatch' - run: | - docker run \ - -e PR_COMMIT_RANGE \ - -e MJKEY \ - --memory 6500m \ - --memory-swap 6500m \ - "${DOCKER_TAG}" scripts/ci/check_precommit.sh + run: scripts/ci/check_precommit.sh - name: Update check status for PRs from forks uses: LouisBrunner/checks-action@v1.1.1 if: env.IS_PR_FROM_FORK && always() @@ -131,23 +125,18 @@ jobs: name: Run Doctest runs-on: ubuntu-latest needs: check_pre_commit + container: + image: docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} + credentials: + username: ${{ CI_USER }} + password: ${{ secrets.CI_REGISTRY_TOKEN }} + env: + MJKEY: MJKEY + options: --memory 6500m --memory-swap 6500m steps: - - name: Login to GitHub Package Registry - run: echo ${{ secrets.CI_REGISTRY_TOKEN }} | docker login docker.pkg.github.com -u ${CI_USER} --password-stdin - - name: Pull from cache (GitHub Package Registry) - run: docker pull "docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG}" - - name: Tag docker image - run: docker tag docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} ${DOCKER_TAG} - name: Doctest - run: | - docker run \ - -e MJKEY \ - --memory 6500m \ - --memory-swap 6500m \ - "${DOCKER_TAG}" \ - /bin/bash -c \ - 'pushd docs && make doctest clean && popd' + run: pushd docs && make doctest clean && popd - name: Update check status for PRs from forks uses: LouisBrunner/checks-action@v1.1.1 if: env.IS_PR_FROM_FORK && always() @@ -162,37 +151,31 @@ jobs: name: Normal Tests runs-on: ubuntu-latest needs: check_pre_commit + container: + image: docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} + credentials: + username: ${{ CI_USER }} + password: ${{ secrets.CI_REGISTRY_TOKEN }} + env: + CODECOV_TOKEN: CODECOV_TOKEN + GITHUB_ACTIONS: GITHUB_ACTIONS + options: --memory 6500m --memory-swap 6500m steps: - - name: Login to GitHub Package Registry - run: echo ${{ secrets.CI_REGISTRY_TOKEN }} | docker login docker.pkg.github.com -u ${CI_USER} --password-stdin - - name: Pull from cache (GitHub Package Registry) - run: docker pull "docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG}" - - name: Tag docker image - run: docker tag docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} ${DOCKER_TAG} - name: Normal tests run: | - ci_env="$(bash <(curl -s https://codecov.io/env))" && - docker run \ - -e GITHUB_ACTIONS `# used by codecov` \ - -e CODECOV_TOKEN \ - $ci_env\ - --memory 6500m \ - --memory-swap 6500m \ - "${DOCKER_TAG}" \ - /bin/bash -c \ - '[ ! -f ${MJKEY_PATH} ] || mv ${MJKEY_PATH} ${MJKEY_PATH}.bak && - pytest --cov=garage --cov-report=xml --reruns 1 -m \ - "not nightly and not huge and not flaky and not large and not mujoco and not mujoco_long" --durations=20 && - for i in {1..5}; do - bash <(curl -s https://codecov.io/bash --retry 5) -Z && break - if [ $i == 5 ]; then - exit 1 - else - echo "Retry ${i}..." - sleep 30 - fi - done' + ci_env="$(bash <(curl -s https://codecov.io/env))" + pytest --cov=garage --cov-report=xml --reruns 1 -m \ + "not nightly and not huge and not flaky and not large and not mujoco and not mujoco_long" --durations=20 && + for i in {1..5}; do + bash <(curl -s https://codecov.io/bash --retry 5) -Z && break + if [ $i == 5 ]; then + exit 1 + else + echo "Retry ${i}..." + sleep 30 + fi + done - name: Update check status for PRs from forks uses: LouisBrunner/checks-action@v1.1.1 if: env.IS_PR_FROM_FORK && always() @@ -207,36 +190,30 @@ jobs: name: Large Tests runs-on: ubuntu-latest needs: check_pre_commit + container: + image: docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} + credentials: + username: ${{ CI_USER }} + password: ${{ secrets.CI_REGISTRY_TOKEN }} + env: + CODECOV_TOKEN: CODECOV_TOKEN + GITHUB_ACTIONS: GITHUB_ACTIONS + options: --memory 6500m --memory-swap 6500m steps: - - name: Login to GitHub Package Registry - run: echo ${{ secrets.CI_REGISTRY_TOKEN }} | docker login docker.pkg.github.com -u ${CI_USER} --password-stdin - - name: Pull from cache (GitHub Package Registry) - run: docker pull "docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG}" - - name: Tag docker image - run: docker tag docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} ${DOCKER_TAG} - name: Large tests run: | - ci_env="$(bash <(curl -s https://codecov.io/env))" && - docker run \ - -e GITHUB_ACTIONS \ - -e CODECOV_TOKEN \ - $ci_env\ - --memory 6500m \ - --memory-swap 6500m \ - "${DOCKER_TAG}" \ - /bin/bash -c \ - '[ ! -f ${MJKEY_PATH} ] || mv ${MJKEY_PATH} ${MJKEY_PATH}.bak && - pytest --cov=garage --cov-report=xml --reruns 1 -m "large and not flaky" --durations=20 && - for i in {1..5}; do - bash <(curl -s https://codecov.io/bash --retry 5) -Z && break - if [ $i == 5 ]; then - exit 1 - else - echo "Retry ${i}..." - sleep 30 - fi - done' + ci_env="$(bash <(curl -s https://codecov.io/env))" + pytest --cov=garage --cov-report=xml --reruns 1 -m "large and not flaky" --durations=20 && + for i in {1..5}; do + bash <(curl -s https://codecov.io/bash --retry 5) -Z && break + if [ $i == 5 ]; then + exit 1 + else + echo "Retry ${i}..." + sleep 30 + fi + done - name: Update check status for PRs from forks uses: LouisBrunner/checks-action@v1.1.1 if: env.IS_PR_FROM_FORK && always() @@ -251,36 +228,31 @@ jobs: name: MuJoCo-Based Tests runs-on: ubuntu-latest needs: check_pre_commit + container: + image: docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} + credentials: + username: ${{ CI_USER }} + password: ${{ secrets.CI_REGISTRY_TOKEN }} + env: + MJKEY: MJKEY + CODECOV_TOKEN: CODECOV_TOKEN + GITHUB_ACTIONS: GITHUB_ACTIONS + options: --memory 6500m --memory-swap 6500m steps: - - name: Login to GitHub Package Registry - run: echo ${{ secrets.CI_REGISTRY_TOKEN }} | docker login docker.pkg.github.com -u ${CI_USER} --password-stdin - - name: Pull from cache (GitHub Package Registry) - run: docker pull "docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG}" - - name: Tag docker image - run: docker tag docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} ${DOCKER_TAG} - name: MuJoCo tests run: | - ci_env="$(bash <(curl -s https://codecov.io/env))" && - docker run \ - -e MJKEY \ - -e GITHUB_ACTIONS \ - -e CODECOV_TOKEN \ - $ci_env\ - --memory 6500m \ - --memory-swap 6500m \ - "${DOCKER_TAG}" \ - /bin/bash -c \ - 'pytest --cov=garage --cov-report=xml --reruns 1 -m "mujoco and not flaky" --durations=20 && - for i in {1..5}; do - bash <(curl -s https://codecov.io/bash --retry 5) -Z && break - if [ $i == 5 ]; then - exit 1 - else - echo "Retry ${i}..." - sleep 30 - fi - done' + ci_env="$(bash <(curl -s https://codecov.io/env))" + pytest --cov=garage --cov-report=xml --reruns 1 -m "mujoco and not flaky" --durations=20 && + for i in {1..5}; do + bash <(curl -s https://codecov.io/bash --retry 5) -Z && break + if [ $i == 5 ]; then + exit 1 + else + echo "Retry ${i}..." + sleep 30 + fi + done - name: Update check status for PRs from forks uses: LouisBrunner/checks-action@v1.1.1 if: env.IS_PR_FROM_FORK && always() @@ -295,36 +267,32 @@ jobs: name: Large MuJoCo-Based Tests runs-on: ubuntu-latest needs: check_pre_commit + container: + image: docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} + credentials: + username: ${{ CI_USER }} + password: ${{ secrets.CI_REGISTRY_TOKEN }} + env: + MJKEY: MJKEY + CODECOV_TOKEN: CODECOV_TOKEN + GITHUB_ACTIONS: GITHUB_ACTIONS + options: --memory 6500m --memory-swap 6500m + steps: - - name: Login to GitHub Package Registry - run: echo ${{ secrets.CI_REGISTRY_TOKEN }} | docker login docker.pkg.github.com -u ${CI_USER} --password-stdin - - name: Pull from cache (GitHub Package Registry) - run: docker pull "docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG}" - - name: Tag docker image - run: docker tag docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} ${DOCKER_TAG} - name: Large MuJoCo tests run: | ci_env="$(bash <(curl -s https://codecov.io/env))" && - docker run \ - -e MJKEY \ - -e GITHUB_ACTIONS \ - -e CODECOV_TOKEN \ - $ci_env\ - --memory 6500m \ - --memory-swap 6500m \ - "${DOCKER_TAG}" \ - /bin/bash -c \ - 'pytest --cov=garage --cov-report=xml --reruns 1 -m "mujoco_long and not flaky" --durations=20 && - for i in {1..5}; do - bash <(curl -s https://codecov.io/bash --retry 5) -Z && break - if [ $i == 5 ]; then - exit 1 - else - echo "Retry ${i}..." - sleep 30 - fi - done' + pytest --cov=garage --cov-report=xml --reruns 1 -m "mujoco_long and not flaky" --durations=20 && + for i in {1..5}; do + bash <(curl -s https://codecov.io/bash --retry 5) -Z && break + if [ $i == 5 ]; then + exit 1 + else + echo "Retry ${i}..." + sleep 30 + fi + done - name: Update check status for PRs from forks uses: LouisBrunner/checks-action@v1.1.1 if: env.IS_PR_FROM_FORK && always() @@ -340,21 +308,18 @@ jobs: runs-on: ubuntu-latest needs: build_docker_container if: github.event_name == 'schedule' + container: + image: docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} + credentials: + username: ${{ CI_USER }} + password: ${{ secrets.CI_REGISTRY_TOKEN }} + env: + MJKEY: MJKEY + options: --memory 6500m --memory-swap 6500m steps: - - name: Login to GitHub Package Registry - run: echo ${{ secrets.CI_REGISTRY_TOKEN }} | docker login docker.pkg.github.com -u ${CI_USER} --password-stdin - - name: Pull from cache (GitHub Package Registry) - run: docker pull "docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG}" - - name: Tag docker image - run: docker tag docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} ${DOCKER_TAG} - name: Nightly tests - run: | - docker run \ - -e MJKEY \ - --memory 6500m \ - --memory-swap 6500m \ - "${DOCKER_TAG}" pytest -v --reruns 1 -m nightly + run: pytest -v --reruns 1 -m nightly verify_envs_conda: @@ -362,23 +327,19 @@ jobs: runs-on: ubuntu-latest needs: build_docker_container if: github.event_name == 'schedule' + container: + image: docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} + credentials: + username: ${{ CI_USER }} + password: ${{ secrets.CI_REGISTRY_TOKEN }} + env: + MJKEY: MJKEY + options: --memory 6500m --memory-swap 6500m steps: - - name: Login to GitHub Package Registry - run: echo ${{ secrets.CI_REGISTRY_TOKEN }} | docker login docker.pkg.github.com -u ${CI_USER} --password-stdin - - name: Pull from cache (GitHub Package Registry) - run: docker pull "docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG}" - - name: Tag docker image - run: docker tag docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} ${DOCKER_TAG} - name: Verify Conda run: | - docker run \ - -e MJKEY \ - --memory 6500m \ - --memory-swap 6500m \ - "${DOCKER_TAG}" \ - /bin/bash -c \ - 'CONDA_ROOT=$HOME/miniconda \ + CONDA_ROOT=$HOME/miniconda \ CONDA=${CONDA_ROOT}/bin/conda \ GARAGE_BIN=${CONDA_ROOT}/envs/garage-ci/bin; \ touch ${MJKEY_PATH} && \ @@ -393,7 +354,7 @@ jobs: ${CONDA} create -n garage-ci python=3.6 pip -y && \ ${GARAGE_BIN}/pip install --upgrade pip setuptools && \ ${GARAGE_BIN}/pip install dist/garage.tar.gz[all,dev] && \ - ${GARAGE_BIN}/pylint --disable=all --enable=import-error garage' + ${GARAGE_BIN}/pylint --disable=all --enable=import-error garage verify_envs_pipenv: @@ -401,26 +362,19 @@ jobs: runs-on: ubuntu-latest needs: build_docker_container if: github.event_name == 'schedule' + container: + image: docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} + credentials: + username: ${{ CI_USER }} + password: ${{ secrets.CI_REGISTRY_TOKEN }} + env: + MJKEY: MJKEY + options: --memory 6500m --memory-swap 6500m steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Login to GitHub Package Registry - run: echo ${{ secrets.CI_REGISTRY_TOKEN }} | docker login docker.pkg.github.com -u ${CI_USER} --password-stdin - - name: Pull from cache (GitHub Package Registry) - run: docker pull "docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG}" - - name: Tag docker image - run: docker tag docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} ${DOCKER_TAG} - name: Verify Pipenv run: | - docker run \ - -e MJKEY \ - --memory 6500m \ - --memory-swap 6500m \ - "${DOCKER_TAG}" \ - /bin/bash -c \ - "export PATH=\$PATH_NO_VENV && \ + export PATH=\$PATH_NO_VENV && \ export VIRTUAL_ENV= && \ export PIPENV_MAX_RETRIES=2 && \ touch \${MJKEY_PATH} && \ @@ -430,7 +384,7 @@ jobs: pipenv install dist/garage.tar.gz[all,dev] && \ pipenv graph && \ # pylint will verify all imports work - pipenv run pylint --disable=all --enable=import-error garage" + pipenv run pylint --disable=all --enable=import-error garage deploy_to_pypi: From 82831451c5fecf000fede6bdb06981335d67c7d3 Mon Sep 17 00:00:00 2001 From: ziyiwu9494 Date: Mon, 22 Feb 2021 11:28:30 -0800 Subject: [PATCH 2/8] Test ci in container --- .github/workflows/ci-containers-TEST.yml | 135 +++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 .github/workflows/ci-containers-TEST.yml diff --git a/.github/workflows/ci-containers-TEST.yml b/.github/workflows/ci-containers-TEST.yml new file mode 100644 index 0000000000..756d50e76d --- /dev/null +++ b/.github/workflows/ci-containers-TEST.yml @@ -0,0 +1,135 @@ +name: Garage CI + +env: + GARAGE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + PR_COMMIT_RANGE: origin/${{ github.base_ref }}...origin/${{ github.head_ref }} + DOCKER_TAG: garage-ci-${{ github.run_id }} + OWNER: "rlworkgroup" + DOCKER_CACHE_REPO: "garage-ci" + MJKEY: ${{ secrets.MJKEY }} + CI_USER: rlworkgroupbot + IS_PR_FROM_FORK: ${{ github.event.client_payload.pull_request.head.repo.fork }} + +on: + schedule: + - cron: '0 9 * * *' + push: + branches: + - master + # Triggers on release candidates from master + tags: + - 'v[1-9][0-9]*.[0-9]+.[0-9]+rc[0-9]' + - 'v2020.06.[0-9]+rc[0-9]' + pull_request: + branches: + - master + repository_dispatch: + types: [ ok-to-test-command ] + +jobs: + comment_link_to_output_on_fork_pr: + name: Post link to CI output for fork PRs + runs-on: ubuntu-latest + # can't use env.IS_PR_FROM_FORK here because env is not available here + if: github.event.client_payload.pull_request.head.repo.fork + steps: + - name: Dump the client payload context + env: + PAYLOAD_CONTEXT: ${{ toJson(github.event.client_payload) }} + run: echo "$PAYLOAD_CONTEXT" + - name: Create URL to the run output + id: vars + run: echo ::set-output name=run-url::https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID + + - name: Create comment + uses: peter-evans/create-or-update-comment@v1 + with: + token: ${{ secrets.CI_REGISTRY_TOKEN }} + repository: ${{ github.event.client_payload.github.payload.repository.full_name }} + issue-number: ${{ github.event.client_payload.github.payload.issue.number }} + body: | + [Command run output][1] for ${{ github.event.client_payload.pull_request.html_url }}/commits/${{ github.event.client_payload.pull_request.head.sha }} + + [1]: ${{ steps.vars.outputs.run-url }} + + build_docker_container: + name: Build Docker Container + runs-on: ubuntu-latest + if: ${{ !(github.event.pull_request.head.repo.fork && github.event_name == 'pull_request') }} + steps: + - name: Docker info + run: docker version + - uses: actions/checkout@v2 + if: ${{ !env.IS_PR_FROM_FORK }} + with: + fetch-depth: 0 + - uses: actions/checkout@v2 + if: env.IS_PR_FROM_FORK + with: + ref: ${{ github.event.client_payload.pull_request.merge_commit_sha }} + fetch-depth: 0 + - name: Login to GitHub Package Registry + run: echo ${{ secrets.CI_REGISTRY_TOKEN }} | docker login docker.pkg.github.com -u ${CI_USER} --password-stdin + - name: Build Docker container + run: | + DOCKER_BUILDKIT=1 docker build . \ + -f docker/Dockerfile \ + --target garage-dev \ + -t "${DOCKER_TAG}" \ + --build-arg GARAGE_GH_TOKEN \ + --cache-from="docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG}" + - name: Push to cache (GitHub Package Registry) + run: | + docker tag "${DOCKER_TAG}" "docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG}" + docker push "docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG}" + - name: Update check status for PRs from forks + uses: LouisBrunner/checks-action@v1.1.1 + if: always() && env.IS_PR_FROM_FORK + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: Build Docker Container + sha: ${{ github.event.client_payload.pull_request.head.sha }} + conclusion: ${{ job.status }} + + + check_pre_commit: + name: Check pre-commit + runs-on: ubuntu-latest + needs: build_docker_container + container: + image: docker.pkg.github.com/rlworkgroup/garage-ci/garage-ci-${{ github.run_id }} + credentials: + username: rlworkgroupbot + password: ${{ secrets.CI_REGISTRY_TOKEN }} + env: + MJKEY: ${{ secrets.MJKEY }} + PR_COMMIT_RANGE: origin/${{ github.base_ref }}...origin/${{ github.head_ref }} + options: --memory 6500m --memory-swap 6500m + + steps: + - name: Check pre-commit + if: github.event_name == 'pull_request' || github.event_name == 'repository_dispatch' + run: scripts/ci/check_precommit.sh + - name: Update check status for PRs from forks + uses: LouisBrunner/checks-action@v1.1.1 + if: env.IS_PR_FROM_FORK && always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: Check pre-commit + sha: ${{ github.event.client_payload.pull_request.head.sha }} + conclusion: ${{ job.status }} + + delete_docker_container: + name: Delete Docker Container + runs-on: ubuntu-latest + needs: check_pre_commit + if: ${{ always() && needs.build_docker_container.result == 'success' }} + + steps: + - uses: actions/delete-package-versions@v1 + with: + owner: ${{ env.OWNER }} + repo: ${{ env.DOCKER_CACHE_REPO }} + package-name: ${{ env.DOCKER_TAG }} + token: ${{ secrets.CI_REGISTRY_TOKEN }} From 6d05e37a0ac6a681f419bdf10ca9d2e5c1db2318 Mon Sep 17 00:00:00 2001 From: ziyiwu9494 Date: Mon, 22 Feb 2021 12:06:21 -0800 Subject: [PATCH 3/8] Test ci in container --- .github/workflows/ci-containers-TEST.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-containers-TEST.yml b/.github/workflows/ci-containers-TEST.yml index 756d50e76d..d9a0e861b5 100644 --- a/.github/workflows/ci-containers-TEST.yml +++ b/.github/workflows/ci-containers-TEST.yml @@ -110,7 +110,7 @@ jobs: steps: - name: Check pre-commit if: github.event_name == 'pull_request' || github.event_name == 'repository_dispatch' - run: scripts/ci/check_precommit.sh + run: bash scripts/ci/check_precommit.sh - name: Update check status for PRs from forks uses: LouisBrunner/checks-action@v1.1.1 if: env.IS_PR_FROM_FORK && always() From 3db08d34e11a0b2f93f8811318c7e397194551db Mon Sep 17 00:00:00 2001 From: ziyiwu9494 Date: Mon, 22 Feb 2021 16:43:38 -0800 Subject: [PATCH 4/8] Test ci in container --- .github/workflows/ci-containers-TEST.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-containers-TEST.yml b/.github/workflows/ci-containers-TEST.yml index d9a0e861b5..d0473ddcef 100644 --- a/.github/workflows/ci-containers-TEST.yml +++ b/.github/workflows/ci-containers-TEST.yml @@ -110,7 +110,7 @@ jobs: steps: - name: Check pre-commit if: github.event_name == 'pull_request' || github.event_name == 'repository_dispatch' - run: bash scripts/ci/check_precommit.sh + run: bash code/garage/scripts/ci/check_precommit.sh - name: Update check status for PRs from forks uses: LouisBrunner/checks-action@v1.1.1 if: env.IS_PR_FROM_FORK && always() From 658f65bc5eebd3d5d2891a375daa6cbcc9984990 Mon Sep 17 00:00:00 2001 From: ziyiwu9494 Date: Mon, 22 Feb 2021 17:54:40 -0800 Subject: [PATCH 5/8] Figure out directories --- .github/workflows/ci-containers-TEST.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-containers-TEST.yml b/.github/workflows/ci-containers-TEST.yml index d0473ddcef..68e38a5ac9 100644 --- a/.github/workflows/ci-containers-TEST.yml +++ b/.github/workflows/ci-containers-TEST.yml @@ -105,12 +105,12 @@ jobs: env: MJKEY: ${{ secrets.MJKEY }} PR_COMMIT_RANGE: origin/${{ github.base_ref }}...origin/${{ github.head_ref }} - options: --memory 6500m --memory-swap 6500m + options: --memory 6500m --memory-swap 6500m --workdir="code/garage" steps: - name: Check pre-commit if: github.event_name == 'pull_request' || github.event_name == 'repository_dispatch' - run: bash code/garage/scripts/ci/check_precommit.sh + run: ls -l - name: Update check status for PRs from forks uses: LouisBrunner/checks-action@v1.1.1 if: env.IS_PR_FROM_FORK && always() From 31c6c6f24af89fec57f0a03f4074afa6b441e69c Mon Sep 17 00:00:00 2001 From: ziyiwu9494 Date: Mon, 22 Feb 2021 17:56:34 -0800 Subject: [PATCH 6/8] Figure out directories --- .github/workflows/ci-containers-TEST.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-containers-TEST.yml b/.github/workflows/ci-containers-TEST.yml index 68e38a5ac9..b51063aba1 100644 --- a/.github/workflows/ci-containers-TEST.yml +++ b/.github/workflows/ci-containers-TEST.yml @@ -105,7 +105,7 @@ jobs: env: MJKEY: ${{ secrets.MJKEY }} PR_COMMIT_RANGE: origin/${{ github.base_ref }}...origin/${{ github.head_ref }} - options: --memory 6500m --memory-swap 6500m --workdir="code/garage" + options: --memory 6500m --memory-swap 6500m --workdir="/garage-user/code/garage" steps: - name: Check pre-commit From 48d55a2e78ac8968a71891e1993ca05cee5e6dee Mon Sep 17 00:00:00 2001 From: ziyiwu9494 Date: Tue, 23 Feb 2021 20:30:59 -0800 Subject: [PATCH 7/8] Figure out directories --- .github/workflows/ci-containers-TEST.yml | 28 ++++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci-containers-TEST.yml b/.github/workflows/ci-containers-TEST.yml index b51063aba1..a613a4d6a4 100644 --- a/.github/workflows/ci-containers-TEST.yml +++ b/.github/workflows/ci-containers-TEST.yml @@ -110,7 +110,7 @@ jobs: steps: - name: Check pre-commit if: github.event_name == 'pull_request' || github.event_name == 'repository_dispatch' - run: ls -l + run: pwd - name: Update check status for PRs from forks uses: LouisBrunner/checks-action@v1.1.1 if: env.IS_PR_FROM_FORK && always() @@ -120,16 +120,16 @@ jobs: sha: ${{ github.event.client_payload.pull_request.head.sha }} conclusion: ${{ job.status }} - delete_docker_container: - name: Delete Docker Container - runs-on: ubuntu-latest - needs: check_pre_commit - if: ${{ always() && needs.build_docker_container.result == 'success' }} - - steps: - - uses: actions/delete-package-versions@v1 - with: - owner: ${{ env.OWNER }} - repo: ${{ env.DOCKER_CACHE_REPO }} - package-name: ${{ env.DOCKER_TAG }} - token: ${{ secrets.CI_REGISTRY_TOKEN }} +# delete_docker_container: +# name: Delete Docker Container +# runs-on: ubuntu-latest +# needs: check_pre_commit +# if: ${{ always() && needs.build_docker_container.result == 'success' }} +# +# steps: +# - uses: actions/delete-package-versions@v1 +# with: +# owner: ${{ env.OWNER }} +# repo: ${{ env.DOCKER_CACHE_REPO }} +# package-name: ${{ env.DOCKER_TAG }} +# token: ${{ secrets.CI_REGISTRY_TOKEN }} From 2d9ea41e7a58f2cd185f3e58fb9c0f9de87eb206 Mon Sep 17 00:00:00 2001 From: ziyiwu9494 Date: Wed, 24 Feb 2021 14:33:54 -0800 Subject: [PATCH 8/8] Figure out directories --- .github/workflows/ci-containers-TEST.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-containers-TEST.yml b/.github/workflows/ci-containers-TEST.yml index a613a4d6a4..48e375703c 100644 --- a/.github/workflows/ci-containers-TEST.yml +++ b/.github/workflows/ci-containers-TEST.yml @@ -105,7 +105,7 @@ jobs: env: MJKEY: ${{ secrets.MJKEY }} PR_COMMIT_RANGE: origin/${{ github.base_ref }}...origin/${{ github.head_ref }} - options: --memory 6500m --memory-swap 6500m --workdir="/garage-user/code/garage" + options: --memory 6500m --memory-swap 6500m steps: - name: Check pre-commit