From ee65c169385c2039e6983c2bf28a29588ac70635 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 31 Aug 2021 12:07:40 -0400 Subject: [PATCH 1/8] Migrate to GitHub Actions --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ .travis.yml | 20 -------------------- azure-pipelines.yml | 34 ---------------------------------- 3 files changed, 21 insertions(+), 54 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml delete mode 100644 azure-pipelines.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..d0171dcb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: Workflow for Codecov example-python +on: [push, pull_request] +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Run tests and collect coverage + run: coverage run tests.py + - name: Download and validate Codecov uploader + run: | + curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step + curl -Os https://uploader.codecov.io/latest/linux/codecov + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM + shasum -a 256 -c codecov.SHA256SUM + chmod +x codecov + - name: Upload coverage to Codecov + run: ./codecov diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a5342d85..00000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -# Disable sudo to speed up the build -sudo: false - -# Set the build language to Python -language: python - -# Set the python version to 2.7 -python: 2.7 - -# Install the codecov pip dependency -install: - - pip install codecov - -# Run the unit test -script: - - coverage run tests.py - -# Push the results back to codecov -after_success: - - codecov diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index c9ea4d44..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,34 +0,0 @@ -# Azure Pipelines configuration - -trigger: -- master - -pool: - vmImage: 'ubuntu-latest' -strategy: - matrix: - Python35: - python.version: '3.5' - Python36: - python.version: '3.6' - Python37: - python.version: '3.7' - -steps: -- task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - displayName: 'Use Python $(python.version)' - -- script: | - python -m pip install --upgrade pip - pip install coverage - displayName: 'Install coverage' - -- script: | - coverage run tests.py - displayName: 'Run tests' - -- script: | - bash <(curl -s https://codecov.io/bash) - displayName: 'Upload to codecov.io' From 63b7a3b40a6e93d71d81c8bbd5103cdf9467881a Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 31 Aug 2021 12:10:35 -0400 Subject: [PATCH 2/8] pip-install --- .github/workflows/ci.yml | 2 ++ requirements.txt | 1 + 2 files changed, 3 insertions(+) create mode 100644 requirements.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0171dcb..f07e172e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Install dependencies + run: pip install -r requirements.txt - name: Run tests and collect coverage run: coverage run tests.py - name: Download and validate Codecov uploader diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..4ebc8aea --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +coverage From f65d4398c051c7cdcf8e0cd66a4b69560a6155a1 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 31 Aug 2021 12:11:47 -0400 Subject: [PATCH 3/8] coverage xml --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f07e172e..2d62043d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,9 @@ jobs: - name: Install dependencies run: pip install -r requirements.txt - name: Run tests and collect coverage - run: coverage run tests.py + run: | + coverage run tests.py + coverage xml - name: Download and validate Codecov uploader run: | curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step From 40349c660c8d3355f3587de7a583ee9ce867eb41 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 31 Aug 2021 12:16:19 -0400 Subject: [PATCH 4/8] Add back in circleci --- .circleci/config.yml | 18 ++++++++++++++++++ .github/workflows/ci.yml | 11 +---------- 2 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..34ddb9c6 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,18 @@ +version: 2.1 +orbs: + codecov: codecov/codecov:3.0.0 +jobs: + build-and-test: + docker: + - image: cimg/python:3.9.6 + steps: + - checkout + - run: + name: Install dependencies + command: pip install -r requirements.txt + - run: + name: Run tests and collect coverage + run: | + coverage run tests.py + coverage xml + - codecov/upload diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d62043d..20a2edf0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,14 +12,5 @@ jobs: run: | coverage run tests.py coverage xml - - name: Download and validate Codecov uploader - run: | - curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step - curl -Os https://uploader.codecov.io/latest/linux/codecov - curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM - curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig - gpgv codecov.SHA256SUM.sig codecov.SHA256SUM - shasum -a 256 -c codecov.SHA256SUM - chmod +x codecov - name: Upload coverage to Codecov - run: ./codecov + uses: codecov/codecov-action@v2 From 768007540236bcdd1a9e8f33bd7329cd2e1a5b3e Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 31 Aug 2021 12:18:51 -0400 Subject: [PATCH 5/8] Add circleci workflow --- .circleci/config.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 34ddb9c6..d1acc797 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 orbs: codecov: codecov/codecov:3.0.0 jobs: - build-and-test: + build: docker: - image: cimg/python:3.9.6 steps: @@ -16,3 +16,9 @@ jobs: coverage run tests.py coverage xml - codecov/upload + +workflow: + version: 2.1 + build-test: + jobs: + - build From 235b0ab6d79110feb9a9c1e7d451c9cf49cd6632 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 31 Aug 2021 12:20:21 -0400 Subject: [PATCH 6/8] typo --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d1acc797..9ea27537 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,7 @@ version: 2.1 orbs: codecov: codecov/codecov:3.0.0 + jobs: build: docker: @@ -12,7 +13,7 @@ jobs: command: pip install -r requirements.txt - run: name: Run tests and collect coverage - run: | + command: | coverage run tests.py coverage xml - codecov/upload From 5ff35afc69fba0c074183a1bdb2252d68ff668c5 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Tue, 31 Aug 2021 12:22:07 -0400 Subject: [PATCH 7/8] codecov orb --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9ea27537..edf6a031 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ version: 2.1 orbs: - codecov: codecov/codecov:3.0.0 + codecov: codecov/codecov@3.0.0 jobs: build: From e8b8aeb142a0b81668d6c1f0341ea00dca45a672 Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Tue, 31 Aug 2021 13:04:43 -0400 Subject: [PATCH 8/8] Update .github/workflows/ci.yml Co-authored-by: Mitchell Borrego --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 20a2edf0..433eac75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 - name: Install dependencies run: pip install -r requirements.txt - name: Run tests and collect coverage