From 81aac2aa8be9bc180d342f3155449588b11afdb6 Mon Sep 17 00:00:00 2001 From: Dong Huynh Date: Sat, 11 May 2024 14:42:55 +0100 Subject: [PATCH 01/11] Create CI.yml Initial CI job --- .github/workflows/CI.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/CI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..7985eee --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,35 @@ +--- +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +jobs: + tests: + name: tox on ${{ matrix.python-version }} + runs-on: ubuntu-latest + env: + USING_COVERAGE: '3.12' + + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -VV + python -m site + python -m pip install --upgrade pip setuptools wheel + python -m pip install --upgrade coverage[toml] tox tox-gh-actions + + - name: Run tox targets for ${{ matrix.python-version }} + run: python -m tox From 35fb5cc663b10dfb11bbac4624822274cdd314ca Mon Sep 17 00:00:00 2001 From: Dong Huynh Date: Sat, 11 May 2024 14:48:32 +0100 Subject: [PATCH 02/11] Running CI workflow on master and dev PRs --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7985eee..04627df 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -3,9 +3,9 @@ name: CI on: push: - branches: [main] + branches: [main, master] pull_request: - branches: [main] + branches: [main, master, dev] workflow_dispatch: jobs: From 785c3ad09d8856125347752bd9219a5328835742 Mon Sep 17 00:00:00 2001 From: Dong Huynh Date: Sat, 11 May 2024 14:54:49 +0100 Subject: [PATCH 03/11] Added graphviz setup to CI --- .github/workflows/CI.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 04627df..ad3e4d1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -21,6 +21,8 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Setup Graphviz + uses: ts-graphviz/setup-graphviz@v2 - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} From 7bf6251327068f3b2b1472c3a1aebd71acbb68c9 Mon Sep 17 00:00:00 2001 From: Dong Huynh Date: Sat, 11 May 2024 14:59:53 +0100 Subject: [PATCH 04/11] Bumped actions/setup-python to v5 --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ad3e4d1..f419a9f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v4 - name: Setup Graphviz uses: ts-graphviz/setup-graphviz@v2 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies From f5e9ec764d22b7ac7f66df278ab5b893b795a1c8 Mon Sep 17 00:00:00 2001 From: Trung Dong Huynh Date: Sat, 11 May 2024 17:32:33 +0100 Subject: [PATCH 05/11] Removed travis setup --- .travis.yml | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4a55bd0..0000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -sudo: false -language: python -python: - - "3.6" - - "3.7" - - "3.8" - - "3.9" - - "pypy3" - -addons: - apt: - packages: - - graphviz - -cache: - - pip - - apt - -# Install packages -install: - - pip install --upgrade setuptools - - pip install -r requirements.txt - - pip install coverage coveralls - -# Run test -script: - - coverage run setup.py test - -after_success: - - coveralls From 2aba79b1828f2aa94641d6e39e2cb8240806664a Mon Sep 17 00:00:00 2001 From: Trung Dong Huynh Date: Sat, 11 May 2024 17:37:25 +0100 Subject: [PATCH 06/11] Updated the CI badge (from GitHub Workflows) --- README.rst | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index df801af..fb45ba5 100644 --- a/README.rst +++ b/README.rst @@ -6,15 +6,12 @@ Introduction .. image:: https://badge.fury.io/py/prov.svg :target: http://badge.fury.io/py/prov :alt: Latest Release -.. image:: https://travis-ci.org/trungdong/prov.svg - :target: https://travis-ci.org/trungdong/prov - :alt: Build Status +.. image:: https://github.com/trungdong/prov/workflows/CI/badge.svg?branch=master + :target: https://github.com/trungdong/prov/actions?workflow=CI + :alt: CI Status .. image:: https://img.shields.io/coveralls/trungdong/prov.svg :target: https://coveralls.io/r/trungdong/prov?branch=master :alt: Coverage Status -.. image:: https://landscape.io/github/trungdong/prov/master/landscape.svg?style=flat - :target: https://landscape.io/github/trungdong/prov/master - :alt: Code Health .. image:: https://img.shields.io/pypi/wheel/prov.svg :target: https://pypi.python.org/pypi/prov/ :alt: Wheel Status From 31cf71db186f7c2291a815c7e21710f878466621 Mon Sep 17 00:00:00 2001 From: Trung Dong Huynh Date: Sat, 11 May 2024 17:49:12 +0100 Subject: [PATCH 07/11] CI: Caching 'pip' --- .github/workflows/CI.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f419a9f..ba1da17 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -26,12 +26,13 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + cache: 'pip' - name: Install dependencies run: | python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade coverage[toml] tox tox-gh-actions + python -m pip install --upgrade coverage[toml] tox tox-gh-actions - name: Run tox targets for ${{ matrix.python-version }} run: python -m tox From f1a796f8e8c9c70e3b438bfc07e7457bda512549 Mon Sep 17 00:00:00 2001 From: Dong Huynh Date: Sat, 11 May 2024 18:15:04 +0100 Subject: [PATCH 08/11] Running coverage with tox --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ba1da17..16e70ac 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -35,4 +35,4 @@ jobs: python -m pip install --upgrade coverage[toml] tox tox-gh-actions - name: Run tox targets for ${{ matrix.python-version }} - run: python -m tox + run: coverage run -m tox From a9694f23ad023014100adb248e0a353459c65a34 Mon Sep 17 00:00:00 2001 From: Dong Huynh Date: Sat, 11 May 2024 18:19:51 +0100 Subject: [PATCH 09/11] CI: Uploading coverage to coveralls.io --- .github/workflows/CI.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 16e70ac..b9afc6f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -12,8 +12,6 @@ jobs: tests: name: tox on ${{ matrix.python-version }} runs-on: ubuntu-latest - env: - USING_COVERAGE: '3.12' strategy: matrix: @@ -36,3 +34,6 @@ jobs: - name: Run tox targets for ${{ matrix.python-version }} run: coverage run -m tox + + - name: Coveralls + uses: coverallsapp/github-action@v2 From 0653db15bba1b5f1c1636912407b2c6564607e0a Mon Sep 17 00:00:00 2001 From: Dong Huynh Date: Sat, 11 May 2024 18:27:15 +0100 Subject: [PATCH 10/11] CI: fixing reporting for coveralls.io --- .github/workflows/CI.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b9afc6f..986471d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -35,5 +35,10 @@ jobs: - name: Run tox targets for ${{ matrix.python-version }} run: coverage run -m tox + - name: Coverage report + run: coverage xml + - name: Coveralls uses: coverallsapp/github-action@v2 + with: + format: cobertura From 9d535726c756c35d20a6c6afb31773ff868517d9 Mon Sep 17 00:00:00 2001 From: Dong Huynh Date: Sat, 11 May 2024 18:34:31 +0100 Subject: [PATCH 11/11] CI: Removed coverage and coveralls for now --- .github/workflows/CI.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 986471d..ca8dfef 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -33,12 +33,4 @@ jobs: python -m pip install --upgrade coverage[toml] tox tox-gh-actions - name: Run tox targets for ${{ matrix.python-version }} - run: coverage run -m tox - - - name: Coverage report - run: coverage xml - - - name: Coveralls - uses: coverallsapp/github-action@v2 - with: - format: cobertura + run: python -m tox