Skip to content

Configurable hostname (#21) #89

Configurable hostname (#21)

Configurable hostname (#21) #89

Workflow file for this run

---
name: CI
'on':
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
defaults:
run:
working-directory: 'yethal.nushell'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OBJC_DISABLE_INITIALIZE_FORK_SAFETY: YES
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
outputs:
tests: ${{ steps.tests-list.outputs.tests }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: 'yethal.nushell'
- name: Set up Python 3.
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip3 install -r requirements.txt
- name: Run yamllint
run: yamllint .
- name: Run ansible-lint
run: ansible-lint .
- name: Generate test list
id: tests-list
run: echo "tests=$(ls molecule | grep -v "common\|macos" | jq -sRc 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
molecule:
name: Molecule
runs-on: ${{ matrix.os }}
needs: lint
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
distro:
- ubuntu2004
- ubuntu2404
scenario: ${{ fromJson(needs.lint.outputs.tests) }}
include:
- os: macos-latest
scenario: macos
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: 'yethal.nushell'
- name: Set up Python 3.
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: pip3 install -r requirements.txt
- name: Run ${{ matrix.scenario }} test
run: molecule test -s ${{ matrix.scenario }}
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
MOLECULE_DISTRO: ${{ matrix.distro }}