Skip to content

Commit

Permalink
Automatic test deployment
Browse files Browse the repository at this point in the history
This patch adds a GitHub Action workflow to automatically run a test
deployment against a few EL9 variants to check that we end up with a
running Opensearch.
  • Loading branch information
lkiesow committed Jul 19, 2024
1 parent 412d26f commit b390698
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
opencast_version_major: 16
- role: elan.opencast_opensearch
opensearch_api_host: '0.0.0.0'

0 comments on commit b390698

Please sign in to comment.