Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module 1 & 2 #18

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 25 additions & 33 deletions .github/workflows/ansible-test.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,42 @@


name: ansible-test

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
on: [push, pull_request]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
defaults:
run:
working-directory: ansible_collections/ohioit/github

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Clone the repo
uses: actions/checkout@v2
with:
path: ansible_collections/ohioit/github

- name: Set up Python 3.6.9
uses: actions/setup-python@v2
with:
python-version: 3.6.9

- name: Install Ansible
run: pip install ansible

- name: Install PyGithub
run: pip install PyGithub

- name: Perform sanity testing with ansible-test on module files
run: ansible-test sanity --python 3.6 --skip-test import plugins/modules/*

- name: Perform unit testing with ansible-test
uses: ansible-community/ansible-test-gh-action@release/v1
with:
ansible-core-version: stable-2.11
pre-test-cmd: echo This runs before the ansible-test invocation
python-version: 3.9
target-python-version: 3.9
python-version: 3.6
target-python-version: 3.6
testing-type: units
test-deps: >-
ansible.netcommon
ansible.utils
- name: Perform integration testing with ansible-test
uses: ansible-community/ansible-test-gh-action@release/v1
with:
ansible-core-version: stable-2.11
pre-test-cmd: echo This runs before the ansible-test invocation
python-version: 3.9
target-python-version: 3.9
testing-type: integration
test-deps: ansible.netcommon
- name: Perform sanity testing with ansible-test
uses: ansible-community/ansible-test-gh-action@release/v1
with:
ansible-core-version: stable-2.11
testing-type: sanity

39 changes: 0 additions & 39 deletions .github/workflows/ansible.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
checkName: 'flake8_py3'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a consistent version of python in the GitHub workflows. The ansible test workflow is using 3.6.9. Please use 3.9.x for all workflows.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pip install PyGithub
## Usage

### Repository Information (From organization)

```
- name: "List GitHub repositories within a non-enterprise organization"
ohioit.github.repository_information:
Expand Down
Loading