Skip to content

Commit 86ad99d

Browse files
authored
test: Quality assurance (#1)
2 parents 1ced3e0 + 41f5eef commit 86ad99d

File tree

6 files changed

+6862
-46
lines changed

6 files changed

+6862
-46
lines changed

.github/workflows/lint.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Ansible Lint
2+
3+
on:
4+
push:
5+
paths:
6+
- '**/*.yml'
7+
pull_request:
8+
paths:
9+
- '**/*.yml'
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
lint:
17+
name: Lint
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
strategy:
22+
matrix:
23+
python-version: ['3.9']
24+
env:
25+
ANSIBLE_PATH: .
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Set up Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
35+
- name: Install dependencies
36+
run: pip install ansible~=8.7 ansible-lint~=6.22
37+
38+
- name: Run ansible-lint
39+
run: ansible-lint --offline ${{ env.ANSIBLE_PATH }}

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Semantic Release
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Ansible Lint"]
6+
types:
7+
- completed
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
release:
15+
name: Release
16+
runs-on: ubuntu-latest
17+
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }}
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Set up Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: "lts/*"
28+
29+
- name: Install dependencies
30+
run: npm ci
31+
32+
- name: Verify dependency signatures
33+
run: npm audit signatures || echo "Some dependency signatures could not be verified!"
34+
35+
- name: Run semantic-release
36+
run: npx semantic-release
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.releaserc

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
{
2-
"branches": [
3-
"main"
4-
],
5-
"tagFormat": "${version}",
6-
"plugins": [
7-
[
8-
"@semantic-release/commit-analyzer",
9-
{
10-
"preset": "angular"
11-
}
2+
"branches": [
3+
"main"
124
],
13-
[
14-
"@semantic-release/release-notes-generator",
15-
{
16-
"preset": "angular"
17-
}
18-
],
19-
[
20-
"@semantic-release/changelog",
21-
{
22-
"changelogTitle": "# Changelog\n\nAll notable changes to this project are documented in this file. See\n[Conventional Commits](https://conventionalcommits.org) for commit guidelines."
23-
}
24-
],
25-
[
26-
"@semantic-release/git",
27-
{
28-
"assets": ["CHANGELOG.md"],
29-
"message": "chore: Release ${nextRelease.version}\n\n${nextRelease.notes}"
30-
}
31-
]
5+
"tagFormat": "${version}",
6+
"plugins": [
7+
[
8+
"@semantic-release/commit-analyzer",
9+
{
10+
"preset": "angular"
11+
}
12+
],
13+
[
14+
"@semantic-release/release-notes-generator",
15+
{
16+
"preset": "angular"
17+
}
18+
],
19+
[
20+
"@semantic-release/changelog",
21+
{
22+
"changelogTitle": "# Changelog\n\nAll notable changes to this project are documented in this file. See\n[Conventional Commits](https://conventionalcommits.org) for commit guidelines."
23+
}
24+
],
25+
[
26+
"@semantic-release/git",
27+
{
28+
"assets": ["CHANGELOG.md"],
29+
"message": "chore: ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
30+
}
31+
]
3232
]
3333
}

CONTRIBUTING.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,19 @@ it easier to get your contribution accepted.
77

88
## Getting Started
99

10-
* Fork the repository on GitHub.
10+
* Fork the repository.
1111
* Read the [README.md](./README.md) for usage/test instructions.
1212
* Play with the project, submit bugs or patches.
1313

1414
### Contribution Flow
1515

16-
>💡 The private upstream of this repository uses [GitLab CI](.gitlab-ci.yml)
16+
>💡 This repository uses [GitHub Actions](.github/workflows)
1717
for automation. Changes merged into the main branch trigger the creation of
18-
new tag and auto-generated [CHANGELOG.md](./CHANGELOG.md) updates.
18+
new tag and an auto-generated [CHANGELOG.md](./CHANGELOG.md).
1919

2020
On the contributors' side:
2121
1. Create a topic branch from the main brach to base your work on.
22-
2. Make commits of logical units (checkout
23-
[commit guidelines](#commit-guidelines) below).
22+
2. Make commits of logical units.
2423
3. Push changes to a topic branch in your GitHub fork of this
2524
repository.
2625
4. Make sure to validate changes by running tests on a
@@ -31,24 +30,22 @@ review/approval.
3130

3231
On the maintainers' side:
3332

34-
1. Review, validate/test internally, and provide feedback prior to porting the
35-
changes into a topic branch in the private GitLab project upstream.
36-
2. Upon approval, squash-merge changes in the upstream, making sure to write a
37-
conventional commit message title during said squashing operation and
38-
including full acknowledgement of the contributors (i.e. list their GitHub handles)
39-
in the commit body.
40-
3. Verify the CI automation updates the [CHANGELOG.md](./CHANGELOG.md) and
41-
creates a new `git tag` on the main branch.
42-
4. Verify the latest changes are mirrored downstream and mark the relevant GitHub
43-
issue as resolved.
33+
1. Review, validate/test internally, and provide feedback prior to approving
34+
the pull request.
35+
2. Upon approval, squash-merge the changes, making sure to provide a relevant
36+
conventional commit message title (checkout
37+
[commit guidelines](#commit-guidelines) below).
38+
3. Verify the CI automation updates the [CHANGELOG.md](./CHANGELOG.md),
39+
and creates a new `git tag` on the main branch.
40+
4441

4542
### Commit Guidelines
4643

4744
This repository enforces
4845
[conventional commits](https://www.conventionalcommits.org/en/v1.0.0/)
4946
to mark breaking, major and minor code changes in accordance with the
5047
[Semantic Versioning](https://semver.org/) standard:
51-
- Commits that are merged to the main branch should always be prefixed by
48+
- Commits that land on the main branch should always be prefixed by a
5249
specific keyword (i.e. `docs`, `style`, `feat`, `fix`, `refactor`, `ci`,
5350
`chore` or `test`)
5451
- Value is communicated to the end-users by three of the prefixes:
@@ -64,4 +61,3 @@ for reporting vulnerabilities. If you suspect you have found a security
6461
vulnerability, please do not file a GitHub issue, but instead email
6562
[support@europeanweather.cloud](mailto:support@europeanweather.cloud) with the
6663
full details, including steps to reproduce the issue.
67-

0 commit comments

Comments
 (0)