This repository has been archived by the owner on Jan 8, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from ansible-community/devel
Made driver compatible with molecule 3.2
- Loading branch information
Showing
9 changed files
with
232 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
# branches to consider in the event; optional, defaults to all | ||
branches: | ||
- master | ||
- 'releases/**' | ||
- 'stable/**' | ||
|
||
jobs: | ||
update_release_draft: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Drafts your next Release notes as Pull Requests are merged into "master" | ||
- uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
name: tox | ||
|
||
on: | ||
create: # is used for publishing to TestPyPI | ||
tags: # any tag regardless of its name, no branches | ||
- "**" | ||
push: # only publishes pushes to the main branch to TestPyPI | ||
branches: # any integration branch but not tag | ||
- "master" | ||
pull_request: | ||
release: | ||
types: | ||
- published # It seems that you can publish directly without creating | ||
schedule: | ||
- cron: 1 0 * * * # Run daily at 0:01 UTC | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.tox_env }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- tox_env: lint | ||
# - tox_env: docs | ||
- tox_env: py36 | ||
PREFIX: PYTEST_REQPASS=1 | ||
- tox_env: py36-devel | ||
PREFIX: PYTEST_REQPASS=1 | ||
- tox_env: py37 | ||
PREFIX: PYTEST_REQPASS=1 | ||
- tox_env: py38 | ||
PREFIX: PYTEST_REQPASS=1 | ||
- tox_env: py39 | ||
PREFIX: PYTEST_REQPASS=1 | ||
- tox_env: py39-devel | ||
PREFIX: PYTEST_REQPASS=1 | ||
- tox_env: packaging | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install system dependencies | ||
run: | | ||
sudo apt-get update \ | ||
&& sudo apt-get install -y ansible \ | ||
&& ansible-doc -l | grep docker_container | ||
- name: Find python version | ||
id: py_ver | ||
shell: python | ||
if: ${{ contains(matrix.tox_env, 'py') }} | ||
run: | | ||
v = '${{ matrix.tox_env }}'.split('-')[0].lstrip('py') | ||
print('::set-output name=version::{0}.{1}'.format(v[0],v[1:])) | ||
# Even our lint and other envs need access to tox | ||
- name: Install a default Python | ||
uses: actions/setup-python@v2 | ||
if: ${{ ! contains(matrix.tox_env, 'py') }} | ||
# Be sure to install the version of python needed by a specific test, if necessary | ||
- name: Set up Python version | ||
uses: actions/setup-python@v2 | ||
if: ${{ contains(matrix.tox_env, 'py') }} | ||
with: | ||
python-version: ${{ steps.py_ver.outputs.version }} | ||
- name: Install dependencies | ||
run: | | ||
docker version | ||
docker info | ||
python -m pip install -U pip | ||
pip install tox | ||
- name: Run tox -e ${{ matrix.tox_env }} | ||
run: | | ||
echo "${{ matrix.PREFIX }} tox -e ${{ matrix.tox_env }}" | ||
${{ matrix.PREFIX }} tox -e ${{ matrix.tox_env }} | ||
publish: | ||
name: Publish to PyPI registry | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
PY_COLORS: 1 | ||
TOXENV: packaging | ||
|
||
steps: | ||
- name: Switch to using Python 3.6 by default | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.6 | ||
- name: Install tox | ||
run: python -m pip install --user tox | ||
- name: Check out src from Git | ||
uses: actions/checkout@v2 | ||
with: | ||
# Get shallow Git history (default) for release events | ||
# but have a complete clone for any other workflows. | ||
# Both options fetch tags but since we're going to remove | ||
# one from HEAD in non-create-tag workflows, we need full | ||
# history for them. | ||
fetch-depth: >- | ||
${{ | ||
( | ||
( | ||
github.event_name == 'create' && | ||
github.event.ref_type == 'tag' | ||
) || | ||
github.event_name == 'release' | ||
) && | ||
1 || 0 | ||
}} | ||
- name: Drop Git tags from HEAD for non-tag-create and non-release events | ||
if: >- | ||
( | ||
github.event_name != 'create' || | ||
github.event.ref_type != 'tag' | ||
) && | ||
github.event_name != 'release' | ||
run: >- | ||
git tag --points-at HEAD | ||
| | ||
xargs git tag --delete | ||
- name: Build dists | ||
run: python -m tox | ||
- name: Publish to test.pypi.org | ||
if: >- | ||
( | ||
github.event_name == 'push' && | ||
github.ref == format( | ||
'refs/heads/{0}', github.event.repository.default_branch | ||
) | ||
) || | ||
( | ||
github.event_name == 'create' && | ||
github.event.ref_type == 'tag' | ||
) | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.testpypi_password }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
- name: Publish to pypi.org | ||
if: >- # "create" workflows run separately from "push" & "pull_request" | ||
github.event_name == 'release' | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.pypi_password }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[pytest] | ||
addopts = -v -rxXs --doctest-modules --durations 10 --cov=molecule_* --cov-report term-missing:skip-covered --cov-report xml | ||
addopts = -v -rxXs --doctest-modules --durations 10 | ||
doctest_optionflags = ALLOW_UNICODE ELLIPSIS | ||
junit_suite_name = molecule_test_suite | ||
norecursedirs = dist doc build .tox .eggs test/scenarios test/resources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.