Skip to content

Commit

Permalink
Merge pull request #2 from lkiesow/test-deployment
Browse files Browse the repository at this point in the history
Automatic test deployment
  • Loading branch information
luniki committed Jul 19, 2024
2 parents e589721 + b390698 commit c8e4918
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---

name: Deployment

on: # yamllint disable-line rule:truthy
- push
- pull_request

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
distribution:
- dist: almalinux
version: '9'
- dist: centos
version: 9-Stream
- dist: rockylinux
version: '9'

steps:
- uses: actions/checkout@v4

- name: install dependencies
run: pip3 install ansible

- name: install elan.opencast_repository
run: ansible-galaxy install elan.opencast_repository

- name: create lxc container
uses: lkiesow/setup-lxc-container@v1
with:
dist: ${{ matrix.distribution.dist }}
release: ${{ matrix.distribution.version }}

- name: deploy opensearch
working-directory: .test
run: ansible-playbook -i test, test.yml

- name: test that opensearch is running
run: >
curl --fail --silent
--retry 30 --retry-delay 1 --retry-all-errors
http://test:9200/
1 change: 1 addition & 0 deletions .test/roles/elan.opencast_opensearch
9 changes: 9 additions & 0 deletions .test/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
- name: Test Deployment
hosts: all
become: true
roles:
- role: elan.opencast_repository

Check failure on line 6 in .test/test.yml

View workflow job for this annotation

GitHub Actions / lint

syntax-check[specific]

the role 'elan.opencast_repository' was not found in /home/runner/work/opencast_opensearch/opencast_opensearch/.test/roles:/home/runner/.cache/ansible-compat/5731fc/roles:/home/runner/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/home/runner/work/opencast_opensearch/opencast_opensearch/.test
opencast_version_major: 16
- role: elan.opencast_opensearch
opensearch_api_host: '0.0.0.0'

0 comments on commit c8e4918

Please sign in to comment.