mirror of
https://github.com/HanXHX/ansible-php.git
synced 2026-03-02 09:52:10 +07:00
⚗️ Modernize and add CI
This commit is contained in:
39
.github/workflows/ci.yml
vendored
Normal file
39
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
|
||||
name: ci
|
||||
'on':
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
|
||||
yaml-lint:
|
||||
name: YAML Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Fetch code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python 3.
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install test dependencies.
|
||||
run: pip3 install yamllint
|
||||
|
||||
- name: Lint code.
|
||||
run: |
|
||||
yamllint .
|
||||
|
||||
ansible-lint:
|
||||
name: Ansible Lint
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Run ansible-lint
|
||||
uses: ansible/ansible-lint@main
|
||||
17
.github/workflows/galaxy.yml
vendored
Normal file
17
.github/workflows/galaxy.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
|
||||
name: Deploy on Ansible Galaxy
|
||||
|
||||
'on':
|
||||
- push
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: galaxy
|
||||
uses: robertdebock/galaxy-action@1.2.0
|
||||
with:
|
||||
galaxy_api_key: ${{ secrets.galaxy_api_key }}
|
||||
43
.github/workflows/molecule.yml
vendored
Normal file
43
.github/workflows/molecule.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
|
||||
name: Molecule
|
||||
|
||||
'on':
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
scenario:
|
||||
- debian-11
|
||||
- debian-12
|
||||
- ubuntu-20.04
|
||||
- ubuntu-22.04
|
||||
- ubuntu-24.04
|
||||
allowed-to-fail:
|
||||
- false
|
||||
include:
|
||||
- scenario: debian-13
|
||||
allowed-to-fail: true
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: "${{ github.repository }}"
|
||||
|
||||
- name: Molecule
|
||||
uses: gofrolist/molecule-action@v2.7.62
|
||||
with:
|
||||
molecule_options: --base-config molecule/_shared/base.yml
|
||||
molecule_args: --scenario-name ${{ matrix.scenario }}
|
||||
continue-on-error: ${{ matrix.allowed-to-fail }}
|
||||
|
||||
- name: Fake command
|
||||
run: echo "End of job"
|
||||
Reference in New Issue
Block a user