CI #111
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
--- | |
name: CI | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
schedule: | |
- cron: '0 0 * * 0' # run every Sunday | |
workflow_dispatch: ~ | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
driver: docker | |
role_name: nkakouros.easyrsa | |
strategy: | |
matrix: | |
distro: | |
- image: geerlingguy/docker-ubuntu1804-ansible:latest | |
instance_name: ubuntu1804-molecule | |
- image: carlodepieri/docker-archlinux-ansible | |
instance_name: archlinux-molecule | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/[email protected] | |
- name: Install molecule | |
run: pip3 install ansible-lint molecule molecule-${{ env.driver }} ${{ env.driver }} flake8 | |
- name: Get linter-config repo | |
uses: actions/checkout@v3 | |
with: | |
repository: nkakouros-original/linter-configs | |
path: linter-configs | |
- name: Copy linter configs in place | |
run: >- | |
cp -r | |
${{ github.workspace }}/linter-configs/configs/. | |
${{ github.workspace }}/; | |
rm -rf linter-configs; | |
- name: Run molecule | |
run: molecule -c molecule.yml test | |
env: | |
CUSTOM_MOLECULE_CONTAINER_IMAGE: ${{ matrix.distro.image }} | |
CUSTOM_MOLECULE_INSTANCE_NAME: ${{ env.role_name}}-${{ matrix.distro.instance_name }} | |
CUSTOM_MOLECULE_DRIVER: ${{ env.driver }} |