From 49669edf4f441904b4d77acb29f76e4fa6292bdd Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Tue, 18 Aug 2020 17:38:17 +0000 Subject: [PATCH] add .0 tests --- .github/workflows/main.yml | 368 ++++++++++++++++++++++++ .github/workflows/templates/generate.py | 8 +- .kitchen.yml | 10 +- tests/conftest.py | 2 + 4 files changed, 383 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f839c60..6084033 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -412,6 +412,52 @@ jobs: bundle exec kitchen destroy py3-git-3001-amazon-2 + py3-stable-3001-0-amazon-2: + name: Amazon 2 v3001.0 Py3 Stable + runs-on: ubuntu-latest + timeout-minutes: 20 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-stable-3001-0-amazon-2 || bundle exec kitchen create py3-stable-3001-0-amazon-2 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-stable-3001-0-amazon-2 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-stable-3001-0-amazon-2 + + py3-git-master-amazon-2: name: Amazon 2 Master Py3 Git runs-on: ubuntu-latest @@ -1148,6 +1194,52 @@ jobs: bundle exec kitchen destroy py3-git-3001-centos-7 + py3-stable-3001-0-centos-7: + name: CentOS 7 v3001.0 Py3 Stable + runs-on: ubuntu-latest + timeout-minutes: 20 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-stable-3001-0-centos-7 || bundle exec kitchen create py3-stable-3001-0-centos-7 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-stable-3001-0-centos-7 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-stable-3001-0-centos-7 + + py3-git-master-centos-7: name: CentOS 7 Master Py3 Git runs-on: ubuntu-latest @@ -1516,6 +1608,52 @@ jobs: bundle exec kitchen destroy py3-git-3001-centos-8 + py3-stable-3001-0-centos-8: + name: CentOS 8 v3001.0 Py3 Stable + runs-on: ubuntu-latest + timeout-minutes: 20 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-stable-3001-0-centos-8 || bundle exec kitchen create py3-stable-3001-0-centos-8 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-stable-3001-0-centos-8 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-stable-3001-0-centos-8 + + py3-git-master-centos-8: name: CentOS 8 Master Py3 Git runs-on: ubuntu-latest @@ -1884,6 +2022,52 @@ jobs: bundle exec kitchen destroy py3-git-3001-debian-10 + py3-stable-3001-0-debian-10: + name: Debian 10 v3001.0 Py3 Stable + runs-on: ubuntu-latest + timeout-minutes: 20 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-stable-3001-0-debian-10 || bundle exec kitchen create py3-stable-3001-0-debian-10 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-stable-3001-0-debian-10 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-stable-3001-0-debian-10 + + py3-git-master-debian-10: name: Debian 10 Master Py3 Git runs-on: ubuntu-latest @@ -2482,6 +2666,52 @@ jobs: bundle exec kitchen destroy py3-git-3001-debian-9 + py3-stable-3001-0-debian-9: + name: Debian 9 v3001.0 Py3 Stable + runs-on: ubuntu-latest + timeout-minutes: 20 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-stable-3001-0-debian-9 || bundle exec kitchen create py3-stable-3001-0-debian-9 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-stable-3001-0-debian-9 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-stable-3001-0-debian-9 + + py3-git-master-debian-9: name: Debian 9 Master Py3 Git runs-on: ubuntu-latest @@ -3632,6 +3862,52 @@ jobs: bundle exec kitchen destroy py3-git-3001-ubuntu-1604 + py3-stable-3001-0-ubuntu-1604: + name: Ubuntu 16.04 v3001.0 Py3 Stable + runs-on: ubuntu-latest + timeout-minutes: 20 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-stable-3001-0-ubuntu-1604 || bundle exec kitchen create py3-stable-3001-0-ubuntu-1604 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-stable-3001-0-ubuntu-1604 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-stable-3001-0-ubuntu-1604 + + py3-git-master-ubuntu-1604: name: Ubuntu 16.04 Master Py3 Git runs-on: ubuntu-latest @@ -4092,6 +4368,52 @@ jobs: bundle exec kitchen destroy py3-git-3001-ubuntu-1804 + py3-stable-3001-0-ubuntu-1804: + name: Ubuntu 18.04 v3001.0 Py3 Stable + runs-on: ubuntu-latest + timeout-minutes: 20 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-stable-3001-0-ubuntu-1804 || bundle exec kitchen create py3-stable-3001-0-ubuntu-1804 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-stable-3001-0-ubuntu-1804 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-stable-3001-0-ubuntu-1804 + + py3-git-master-ubuntu-1804: name: Ubuntu 18.04 Master Py3 Git runs-on: ubuntu-latest @@ -4276,6 +4598,52 @@ jobs: bundle exec kitchen destroy py3-git-3001-ubuntu-2004 + py3-stable-3001-0-ubuntu-2004: + name: Ubuntu 20.04 v3001.0 Py3 Stable + runs-on: ubuntu-latest + timeout-minutes: 20 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-stable-3001-0-ubuntu-2004 || bundle exec kitchen create py3-stable-3001-0-ubuntu-2004 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-stable-3001-0-ubuntu-2004 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-stable-3001-0-ubuntu-2004 + + py3-git-master-ubuntu-2004: name: Ubuntu 20.04 Master Py3 Git runs-on: ubuntu-latest diff --git a/.github/workflows/templates/generate.py b/.github/workflows/templates/generate.py index e46cc9f..9302e69 100755 --- a/.github/workflows/templates/generate.py +++ b/.github/workflows/templates/generate.py @@ -70,6 +70,7 @@ SALT_BRANCHES = [ '2019-2', '3000', '3001', + '3001-0', 'master', 'latest' ] @@ -84,6 +85,7 @@ BRANCH_DISPLAY_NAMES = { '2019-2': 'v2019.2', '3000': 'v3000', '3001': 'v3001', + '3001-0': 'v3001.0', 'master': 'Master', 'latest': 'Latest' } @@ -163,7 +165,7 @@ def generate_test_jobs(): continue try: - if int(branch) >= 3000 and python_version == 'py2': + if int(branch.split('-')[0]) >= 3000 and python_version == 'py2': # Salt's 300X versions no longer supports Python 2 continue except ValueError: @@ -185,6 +187,10 @@ def generate_test_jobs(): continue if bootstrap_type == "git": + # .0 versions are a virtual version for pinning to the first point release of a major release, such as 3001, there is no git version. + if branch.endswith('-0'): + continue + if python_version == "py3": if distro in ("arch", "fedora-32"): allowed_branches = ["master"] diff --git a/.kitchen.yml b/.kitchen.yml index 80c849b..3d43e03 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -194,17 +194,19 @@ suites: - opensuse-15 - arch - ubuntu-2004 - - name: py3-stable-3000-pin + - name: py3-stable-3001-0 provisioner: - salt_version: 3000 - salt_bootstrap_options: -x python3 -MP stable 3000.0 + salt_version: 3001 + salt_bootstrap_options: -x python3 -MP stable 3001.0 excludes: - amazon-1 - centos-6 - debian-8 - opensuse-15 + - fedora-30 + - fedora-31 + - fedora-32 - arch - - ubuntu-2004 - name: py3-stable-3001 provisioner: salt_version: 3001 diff --git a/tests/conftest.py b/tests/conftest.py index 36abec1..a5e262f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -31,6 +31,8 @@ def target_python_version(): @pytest.fixture(scope='session') def target_salt_version(): target_salt = os.environ["KITCHEN_SUITE"].split("-", 2)[-1].replace("-", ".") + if target_salt.endswith(".0") and float(target_salt) >= 3000: + target_salt = ".".join(target_salt.split(".")[:-1]) if target_salt in ("latest", "master"): pytest.skip("Don't have a specific salt version to test against") return target_salt