-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace TravisCI with GitHub actions (#352)
- Loading branch information
Showing
4 changed files
with
85 additions
and
82 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
name: Ansible Galaxy import | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
jobs: | ||
galaxy: | ||
name: Galaxy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the codebase | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install Ansible | ||
run: pip3 install ansible-base==2.10.3 | ||
|
||
- name: Import release to Ansible Galaxy | ||
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2) |
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,59 @@ | ||
--- | ||
name: Molecule CI/CD | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: "0 0 1 * *" | ||
jobs: | ||
molecule: | ||
name: Molecule | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
scenario: | ||
- default | ||
- default_alpine | ||
- default_centos | ||
- module | ||
- module_alpine | ||
- module_centos | ||
- plus | ||
- plus_alpine | ||
- plus_centos | ||
- source | ||
- source_alpine | ||
- source_centos | ||
- stable_push_alpine | ||
- stable_push_centos | ||
- template | ||
- template_alpine | ||
- template_centos | ||
steps: | ||
- name: Check out the codebase | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install Molecule dependencies | ||
run: | | ||
pip3 install ansible-base==2.10.3 | ||
pip3 install ansible==2.10.3 | ||
pip3 install ansible-lint==4.3.7 | ||
pip3 install yamllint==1.25.0 | ||
pip3 install 'molecule[docker]'==3.2.1 | ||
pip3 install docker==4.4.0 | ||
- name: Run Molecule tests | ||
run: molecule test -s ${{ matrix.scenario }} | ||
if: contains(${{ matrix.scenario }}, 'plus') && !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) | ||
env: | ||
PY_COLORS: '1' | ||
ANSIBLE_FORCE_COLOR: '1' | ||
NGINX_CRT: ${{ secrets.NGINX_CRT }} | ||
NGINX_KEY: ${{ secrets.NGINX_KEY }} |
This file was deleted.
Oops, something went wrong.
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