Skip to content

Commit

Permalink
Remove redundant CI files/lines (#2234)
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyiwu9494 authored Feb 19, 2021
1 parent 51e67ce commit 573b60b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 320 deletions.
102 changes: 4 additions & 98 deletions .github/workflows/ci-release-2020.06.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,17 @@ name: Garage CI Release-2020.06
env:
GARAGE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
TRAVIS_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

on:
# The release ci in the master branch handles only cron jobs branch
# The pull_request and push and tag triggers are in the release branch itself
schedule:
- cron: '0 9 * * *'
push:
branches:
- 'release-2020.06'

jobs:
build_docker_container:
Expand Down Expand Up @@ -44,45 +42,12 @@ jobs:
docker push "docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG}"
check_pre_commit:
name: Check pre-commit
runs-on: ubuntu-latest
needs: build_docker_container

steps:
- uses: actions/checkout@v2
if: github.event_name == 'pull_request'
with:
ref: release-2020.06
- name: Login to GitHub Package Registry
if: github.event_name == 'pull_request'
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'
run: docker pull "docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG}"
- name: Tag docker image
if: github.event_name == 'pull_request'
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'
run: |
docker run \
-e TRAVIS_COMMIT_RANGE \
-e MJKEY \
--memory 6500m \
--memory-swap 6500m \
"${DOCKER_TAG}" scripts/travisci/check_precommit.sh
normal_test:
name: Normal Tests
runs-on: ubuntu-latest
needs: check_pre_commit
needs: build_docker_container

steps:
- uses: actions/checkout@v2
with:
ref: release-2020.06
- 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)
Expand All @@ -93,9 +58,7 @@ jobs:
run: |
ci_env="$(bash <(curl -s https://codecov.io/env))" &&
docker run \
-e TRAVIS_COMMIT_RANGE \
-e MJKEY \
-e GITHUB_ACTIONS \
-e GITHUB_ACTIONS `# used by codecov` \
-e CODECOV_TOKEN \
$ci_env\
--memory 6500m \
Expand All @@ -122,9 +85,6 @@ jobs:
needs: check_pre_commit

steps:
- uses: actions/checkout@v2
with:
ref: release-2020.06
- 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)
Expand All @@ -135,8 +95,6 @@ jobs:
run: |
ci_env="$(bash <(curl -s https://codecov.io/env))" &&
docker run \
-e TRAVIS_COMMIT_RANGE \
-e MJKEY \
-e GITHUB_ACTIONS \
-e CODECOV_TOKEN \
$ci_env\
Expand All @@ -163,9 +121,6 @@ jobs:
needs: check_pre_commit

steps:
- uses: actions/checkout@v2
with:
ref: release-2020.06
- 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)
Expand All @@ -176,7 +131,6 @@ jobs:
run: |
ci_env="$(bash <(curl -s https://codecov.io/env))" &&
docker run \
-e TRAVIS_COMMIT_RANGE \
-e MJKEY \
-e GITHUB_ACTIONS \
-e CODECOV_TOKEN \
Expand All @@ -203,9 +157,6 @@ jobs:
needs: check_pre_commit

steps:
- uses: actions/checkout@v2
with:
ref: release-2020.06
- 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)
Expand All @@ -216,7 +167,6 @@ jobs:
run: |
ci_env="$(bash <(curl -s https://codecov.io/env))" &&
docker run \
-e TRAVIS_COMMIT_RANGE \
-e MJKEY \
-e GITHUB_ACTIONS \
-e CODECOV_TOKEN \
Expand Down Expand Up @@ -244,9 +194,6 @@ jobs:
if: github.event_name == 'schedule'

steps:
- uses: actions/checkout@v2
with:
ref: release-2020.06
- 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)
Expand All @@ -255,13 +202,8 @@ jobs:
run: docker tag docker.pkg.github.com/${OWNER}/${DOCKER_CACHE_REPO}/${DOCKER_TAG} ${DOCKER_TAG}
- name: Nightly tests
run: |
ci_env="$(bash <(curl -s https://codecov.io/env))" &&
docker run \
-e TRAVIS_COMMIT_RANGE \
-e MJKEY \
-e GITHUB_ACTIONS \
-e CODECOV_TOKEN \
$ci_env\
--memory 6500m \
--memory-swap 6500m \
"${DOCKER_TAG}" pytest -v -m nightly
Expand All @@ -274,9 +216,6 @@ jobs:
if: github.event_name == 'schedule'

steps:
- uses: actions/checkout@v2
with:
ref: release-2020.06
- 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)
Expand All @@ -286,7 +225,6 @@ jobs:
- name: Verify Conda
run: |
docker run \
-e TRAVIS_COMMIT_RANGE \
-e MJKEY \
--memory 6500m \
--memory-swap 6500m \
Expand Down Expand Up @@ -317,9 +255,6 @@ jobs:
if: github.event_name == 'schedule'

steps:
- uses: actions/checkout@v2
with:
ref: release-2020.06
- 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)
Expand All @@ -329,7 +264,6 @@ jobs:
- name: Verify Pipenv
run: |
docker run \
-e TRAVIS_COMMIT_RANGE \
-e MJKEY \
--memory 6500m \
--memory-swap 6500m \
Expand All @@ -348,34 +282,6 @@ jobs:
pipenv run pylint --disable=all --enable=import-error garage"
deploy_to_pypi:
name: Deploy to PyPI
runs-on: ubuntu-latest
needs: [normal_test, large_test, mujoco_test, mujoco_test_long]
if: startsWith(github.ref, 'refs/tags/v')

steps:
- uses: actions/checkout@v2
with:
ref: release-2020.06
- name: Set up Python 3.5
uses: actions/setup-python@v1
with:
python-version: 3.5
- name: Update Version
run: echo ${GITHUB_REF##*/} > VERSION
- name: Update setuptools
run: pip install --upgrade setuptools
- name: Setup Distribution
run: >-
python setup.py sdist
- name: Deploy to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}


delete_docker_container:
name: Delete Docker Container
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit 573b60b

Please sign in to comment.