summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Contreras <alberto.contreras@canonical.com>2023-03-27 19:51:44 +0200
committerGitHub <noreply@github.com>2023-03-27 12:51:44 -0500
commitad33cbbaa1664cea25d457bef25626edc4a9bbab (patch)
tree7f6320b8e5fb764dbf2327d75a31f09a4db3c82c
parent4b6e4e13159b8db20246818bdce5b893f348ad99 (diff)
downloadcloud-init-git-ad33cbbaa1664cea25d457bef25626edc4a9bbab.tar.gz
ci: migrate remaining jobs from travis to gh (#2085)
-rw-r--r--.github/workflows/unit.yml26
-rw-r--r--.travis.yml34
2 files changed, 17 insertions, 43 deletions
diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml
index 26c278d5..2c72a2a4 100644
--- a/.github/workflows/unit.yml
+++ b/.github/workflows/unit.yml
@@ -12,15 +12,24 @@ jobs:
strategy:
matrix:
python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10", "3.11" ]
- name: Python ${{matrix.python-version}} unittest
+ toxenv: [ py3 ]
+ experimental: [false]
+ include:
+ - python-version: "3.12-dev"
+ toxenv: py3
+ experimental: true
+ - python-version: "3.6"
+ toxenv: lowest-supported
+ experimental: false
+ name: unittest / ${{ matrix.toxenv }} / python ${{matrix.python-version}}
runs-on: ubuntu-20.04
+ continue-on-error: ${{ matrix.experimental }}
steps:
- - name: "Checkout #1"
- uses: actions/checkout@v3.0.0
- - name: "Checkout #2 (for tools/read-version)"
- run: |
- git fetch --unshallow
- git remote add upstream https://git.launchpad.net/cloud-init
+ - name: "Checkout"
+ uses: actions/checkout@v3
+ with:
+ # Fetch all tags for tools/read-version
+ fetch-depth: 0
- name: Install Python ${{matrix.python-version}}
uses: actions/setup-python@v4
with:
@@ -29,6 +38,5 @@ jobs:
run: pip install tox
- name: Run unittest
env:
- TOXENV: py3
PYTEST_ADDOPTS: -v
- run: tox
+ run: tox -e ${{ matrix.toxenv }}
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index b56fdfdc..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-language: python
-dist: bionic
-
-cache: pip
-
-install:
- # Required so `git describe` will definitely find a tag; see
- # https://github.com/travis-ci/travis-ci/issues/7422
- - git fetch --unshallow
- # Not pinning setuptools can cause failures on python 3.7 and 3.8 builds
- # See https://github.com/pypa/setuptools/issues/3118
- - pip install setuptools==59.6.0
- - pip install tox
-
-script:
- - tox
-
-env:
- TOXENV=py3
- PYTEST_ADDOPTS=-v # List all tests run by pytest
-
-matrix:
- fast_finish: true
- include:
- - python: 3.6
- env:
- TOXENV=lowest-supported
- PYTEST_ADDOPTS=-v # List all tests run by pytest
- dist: bionic
- # Test all supported Python versions (but at the end, so we schedule
- # longer-running jobs first)
- - python: 3.12-dev
- allow_failures:
- - python: 3.12-dev