Skip to content

0.3.0: Bump python support #3

0.3.0: Bump python support

0.3.0: Bump python support #3

Workflow file for this run

name: Tox CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install tox
run: pip install --user tox
- name: Lint
run: tox -e lint
unit-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: pip install --user tox
- name: Select tox env
id: tox-env
run: echo tox-env=py${{ matrix.python-version }}-unit | tr -d '.' >> ${GITHUB_OUTPUT}
- name: Run Unit Tests
run: tox -e ${{ steps.tox-env.outputs.tox-env }}
integration-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: pip install --user tox
- name: Run vagrant
run: |
sudo wget -nv https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_x86_64.deb
sudo dpkg -i vagrant_2.2.7_x86_64.deb
sudo rm /opt/vagrant/embedded/bin/ruby
sudo ln -s `which ruby` /opt/vagrant/embedded/bin/ruby
vagrant up
- name: Select tox env
id: tox-env
run: echo tox-env=py${{ matrix.python-version }}-integration | tr -d '.' >> ${GITHUB_OUTPUT}
- name: Run Integration Tests
run: tox -e ${{ steps.tox-env.outputs.tox-env }}
env:
VAULT_TOKEN: st2token
VAULT_ADDR: http://127.0.0.1:8200
set_merge_ok:
name: Set Merge OK
if: always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
needs:
- lint
- unit-tests
- integration-tests
outputs:
merge_ok: ${{ steps.set_merge_ok.outputs.merge_ok }}
runs-on: ubuntu-latest
steps:
- id: set_merge_ok
run: echo 'merge_ok=true' >> ${GITHUB_OUTPUT}
merge_ok:
name: Merge OK
if: always()
needs:
- set_merge_ok
runs-on: ubuntu-latest
steps:
- run: |
merge_ok="${{ needs.set_merge_ok.outputs.merge_ok }}"
if [[ "${merge_ok}" == "true" ]]; then
echo "Merge OK"
exit 0
else
echo "Merge NOT OK"
exit 1
fi