Skip to content

Commit

Permalink
Merge pull request #20 from misdoro/github_actions
Browse files Browse the repository at this point in the history
Migrate to github actions for tests
  • Loading branch information
chtitux authored Jan 15, 2021
2 parents 81b8e46 + ed36fac commit 9c86b2c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 44 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Create test cluster

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
postgresql_version: [10, 11, 12]
debian_release: [buster, stretch]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r test/requirements.txt
ansible --version
ansible-galaxy install -r test/requirements.yml -p test/roles/
- name: Check role syntax
run: |
ansible-playbook test/main.yml -i test/hosts --syntax-check
- name: Run the tests
env:
POSTGRESQL_VERSION: ${{ matrix.postgresql_version }}
DEBIAN_RELEASE: ${{ matrix.debian_release }}
run: |
ansible-playbook test/main.yml -i test/hosts -e "postgres_version=${POSTGRESQL_VERSION}" -e "debian_release=${DEBIAN_RELEASE}"
43 changes: 0 additions & 43 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ This project comes with a `test/main.yml` testing playbook. It uses `Docker` to

Coverage of this playbook is probably not complete but at least it's there.

If you are contributing, please first test your changes in a new playbook in the `test/` directory within docker containers, (using the targeted distribution), and if possible, ensure your change is covered in the tests found in [.travis.yml](./.travis.yml).
If you are contributing, please first test your changes in a new playbook in the `test/` directory within docker containers, (using the targeted distribution), and if possible, ensure your change is covered in the tests.

#### License

Expand Down

0 comments on commit 9c86b2c

Please sign in to comment.