Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Jan 17, 2024
0 parents commit 8597fc5
Show file tree
Hide file tree
Showing 8 changed files with 875 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
25 changes: 25 additions & 0 deletions .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later

name: Verify REUSE

'on':
push:
branches: [main]
pull_request:
branches: [main]
# Run once per week (Friday at 07:00 UTC)
schedule:
- cron: '0 7 * * 5'

jobs:
reuse:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: REUSE Compliance Check
uses: fsfe/reuse-action@v2
68 changes: 68 additions & 0 deletions .github/workflows/test-galaxy-import.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later

name: Test Galaxy import
'on':
workflow_call:
inputs:
build-python-version:
description: >-
The Python version to use.
type: string
default: '3.12'
import-python-version:
description: |-
The Python version to use.
Note that 3.12 currently does not work due to https://github.com/madpah/requirements-parser/issues/88.
type: string
default: '3.11'
ansible-core-version:
description: >-
The branch of tag name of ansible-core to install.
type: string
default: 'stable-2.16'
subdirectory:
description: >-
The subdirectory inside the collection's repo which contains the collection's root (`galaxy.yml` file).
type: string
default: .

jobs:
build-collection:
name: Build collection artifact
permissions:
contents: read
uses: ansible-community/github-action-build-collection/.github/workflows/build-collection.yml@main
with:
python-version: ${{ inputs.build-python-version }}
ansible-core-version: ${{ inputs.ansible-core-version }}
subdirectory: ${{ inputs.subdirectory }}

import-galaxy:
name: Import artifact with Galaxy importer
runs-on: ubuntu-latest
permissions:
contents: read
needs:
- build-collection
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ${{ needs.build-collection.outputs.artifact-name }}

- name: List files
run: ls -la

- name: Test import
uses: ansible-community/github-action-build-collection@main
id: build-collection
with:
python-version: ${{ inputs.import-python-version }}
ansible-core-version: ${{ inputs.ansible-core-version }}
subdirectory: checkout/${{ inputs.subdirectory }}
collection-requirements-path: requirements.yml
artifact-path: ${{ needs.build-collection.outputs.artifact-filename }}
28 changes: 28 additions & 0 deletions .github/workflows/yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later

name: Linting

'on':
push:
branches: [main]
pull_request:
branches: [main]
# Run once per week (Friday at 07:00 UTC)
schedule:
- cron: '0 7 * * 5'

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install yamllint
run: pip install yamllint

- name: Run yamllint
run: yamllint .
9 changes: 9 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later

extends: default

rules:
line-length: disable
Loading

0 comments on commit 8597fc5

Please sign in to comment.