Skip to content

Commit

Permalink
add ci (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
resmo authored Jul 5, 2021
1 parent 928edce commit f5fb69c
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Upload release to Galaxy

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ansible_collections/ngine_io/hashi
steps:
- uses: actions/checkout@v2
with:
path: ansible_collections/ngine_io/hashi
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ansible
- name: Build and publish
env:
ANSIBLE_GALAXY_API_KEY: ${{ secrets.ANSIBLE_GALAXY_API_KEY }}
run: |
ansible-galaxy collection build .
ansible-galaxy collection publish *.tar.gz --api-key $ANSIBLE_GALAXY_API_KEY
36 changes: 36 additions & 0 deletions .github/workflows/sanity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Sanity
on:
schedule:
- cron: "5 12 * * *"
pull_request:

jobs:
sanity:
name: Sanity (${{ matrix.ansible }})
defaults:
run:
working-directory: ansible_collections/ngine_io/hashi
strategy:
matrix:
ansible:
- stable-2.11
- stable-2.10
- stable-2.9
- devel
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/ngine_io/hashi

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install ansible-base (${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check

- name: Run sanity tests
run: ansible-test sanity --docker -v --color
Empty file added tests/.keep
Empty file.

0 comments on commit f5fb69c

Please sign in to comment.