Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub actions and community files. #3

Merged
merged 28 commits into from
Mar 20, 2023
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9009780
Cosmetics.
gwarf Jan 10, 2023
0f24081
Align with Makefiles from other BDII components.
gwarf Jan 10, 2023
523eb06
Import GitHub actions for building, testing and releasing. Import com…
gwarf Jan 10, 2023
376f2b7
ginfo: Add build dep.
gwarf Jan 10, 2023
4b818a5
ginfo: package "community" files.
gwarf Jan 10, 2023
6d202d8
Ignore build dir
gwarf Jan 11, 2023
83d3caf
README: document usage
gwarf Jan 11, 2023
524c7b5
Specify python3 packages.
gwarf Jan 11, 2023
a050404
Rely on json from stdlib.
gwarf Jan 11, 2023
685202b
Remove unused imports
gwarf Jan 11, 2023
05f2010
Remove oldginfo, better kept in repo history
gwarf Jan 11, 2023
9300b38
Ignore nix files
gwarf Jan 11, 2023
caed61d
ginfo: start addressing flake8 reports.
gwarf Jan 11, 2023
bc01ea5
ginfo: format with black, address most of issures reports by flake8
gwarf Jan 11, 2023
92c3388
Ignore test files
gwarf Jan 11, 2023
eb9e95f
rundb: document requirements
gwarf Jan 11, 2023
8addbf0
Convert dict byte keys to string. Convert dict byte values to string …
gwarf Jan 11, 2023
17e21e6
run-db: update doc.
gwarf Jan 11, 2023
9d11781
Align usage block
gwarf Jan 11, 2023
6f4c14a
run-db: ensure db dir is present.
gwarf Jan 11, 2023
b3c1f2b
README: fix examples so that they are working.
gwarf Jan 11, 2023
e7bce16
man page: CSV output is no more available.
gwarf Jan 11, 2023
3cbbaa0
README: document tests
gwarf Jan 11, 2023
9635577
tests: move to python3, adapt time test and disable all the broken/ol…
gwarf Jan 11, 2023
ad20c48
Import test worfklow
gwarf Jan 11, 2023
e851bcf
Update CHANGELOG
gwarf Mar 1, 2023
5a4baf7
Update CHANGELOG
enolfc Mar 15, 2023
18e47d1
build and release: switch to AlmaLinux instead of CentOS Stream
gwarf Mar 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Code of Conduct

This code of conduct applies to the maintainers and contributors alike.

## Dealing with issues and support requests

_We wish to add a specific section on dealing with issues opened against the
repository here._

This repository exists in the context of the EGI Federation. While that scope
does not restrict the usage, it does inform the priority we assign to issues and
the order we deal with them.

We welcome issues reported by the public, and more specifically the community of
people using this repository.

The EGI team is small and cannot support all requests equally.

While we undertake to do everything in our power to respond to issues in a
timely manner, and to prioritise issues based on reasonable requests from
submitters, the maintainers expect that the prioritisation of issues as decided
by them is respected.

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of
experience, nationality, personal appearance, race, religion, or sexual identity
and orientation.

## Our Standards

Examples of behaviour that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behaviour by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behaviour and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behaviour.

Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviours that they deem inappropriate, threatening,
offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behaviour may be
reported by contacting the EGI Foundation team at contact@egi.eu. The team will
review and investigate all complaints, and will respond in a way that it deems
appropriate to the circumstances. The team is obligated to maintain
confidentiality with regard to the reporter of an incident. Further details of
specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!--
Thank you for opening an issue in our repository.
Please use the template below to construct the issue.

Dealing with issues:
- Issues opened here will be evaluated by the maintainers, and given priority
based on that evaluation.
- Support is provided on a best-effort basis
- See the CODE_OF_CONDUCT.md for a deeper description of how we deal with support
and issues.
-->

# Short Description of the issue

<!--
Please provide a plain-language description of what you would like to report.
By using simple, concise language, you can help the maintainers understand the
issue and context, and thereby help them prioritise it.
-->

## Environment

<!--
Provide details of the environment you used when this error occurred
-->

- Operating System:
- Other related components versions:

## Steps to reproduce

<!--
If this is a runtime or other error, please describe what you did to generate the
error
-->

## Logs, stacktrace, or other symptoms

<!--
If you have logs or other supporting information like the stack trace from python,
etc, paste it here.
Use markdown formatting to put output in code blocks
-->

```shell
output
```

<!-- the section below is optional - remove it if you don't know what to propose,
but merely want to report an issue. -->

# Summary of proposed changes
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!--
A good PR should describe what benefit this brings to the repository.
Ideally, there is an existing issue which the PR address.

Please check the Contributing guide CONTRIBUTING.md for style requirements and
advice.
-->

# Summary

<!-- Describe in plain English what this PR does -->

---

<!-- Add, if any, the related issue here, e.g. #6 -->

**Related issue :**
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
4 changes: 4 additions & 0 deletions .github/linters/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
extend-ignore = E203,W503
max-line-length = 88
12 changes: 12 additions & 0 deletions .github/linters/.markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"MD013": {
"line_length": 120,
"code_blocks": false,
"tables": false
},
"MD014": false,
"MD024": false,
"MD026": {
"punctuation": ".,:;!"
}
}
10 changes: 10 additions & 0 deletions .github/linters/mlc_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ignorePatterns": [
{
"pattern": "^http://localhost"
},
{
"pattern": "^https://example.com"
}
]
}
96 changes: 96 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
name: Create packages and test installation

on:
pull_request:

jobs:
# XXX done outside of the build matrix due to different container name
build-centos7:
name: Build CentOS 7 RPMs
runs-on: ubuntu-latest
container: quay.io/centos/centos:7
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install build requisites
run: |
yum install -y rpm-build yum-utils rpmlint
yum-builddep -y ginfo.spec
- name: build rpm
run: |
make clean rpm
rpmlint --file .rpmlint.ini build/RPMS/noarch/*.el7.noarch.rpm
- name: Upload RPMs
uses: actions/upload-artifact@v3
with:
name: rpms7
path: |
build/RPMS/noarch/ginfo-*.el7.noarch.rpm

# Use a matrix for CentOS Stream versions
build:
strategy:
matrix:
centos-version: [8, 9]
name: Build CentOS ${{ matrix.centos-version }} RPMs
runs-on: ubuntu-latest
container: quay.io/centos/centos:stream${{ matrix.centos-version }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install build requisites
run: |
yum install -y rpm-build yum-utils rpmlint
yum-builddep -y ginfo.spec
- name: build rpm
run: |
make clean rpm
rpmlint --file .rpmlint.ini build/RPMS/noarch/*.el${{ matrix.centos-version }}.noarch.rpm
- name: Upload RPMs
uses: actions/upload-artifact@v3
with:
name: rpms${{ matrix.centos-version }}
path: |
build/RPMS/noarch/ginfo-*.el${{ matrix.centos-version }}.noarch.rpm

install-centos7:
name: Install CentOS 7 RPMs
needs: build-centos7
runs-on: ubuntu-latest
container: quay.io/centos/centos:7
steps:
- uses: actions/download-artifact@v3
with:
name: rpms7
- name: Install generated RPMs
run: |
yum localinstall -y ginfo-*.el7.noarch.rpm

centos8-install:
name: Install CentOS Stream 8 RPMs
needs: build
runs-on: ubuntu-latest
container: quay.io/centos/centos:stream8
steps:
- uses: actions/download-artifact@v3
with:
name: rpms8
- name: Install generated RPMs
run: |
yum localinstall -y ginfo-*.el8.noarch.rpm

centos9-install:
name: Install CentOS Stream 9 RPMs
needs: build
runs-on: ubuntu-latest
container: quay.io/centos/centos:stream9
steps:
- uses: actions/download-artifact@v3
with:
name: rpms9
- name: Install generated RPMs
run: |
yum localinstall -y ginfo-*.el9.noarch.rpm
29 changes: 29 additions & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Check links

on:
pull_request:

jobs:
markdown-link-check:
name: Check links using markdown-link-check
runs-on: ubuntu-latest

steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v3
with:
# Make sure the actual branch is checked out when running on PR
ref: ${{ github.event.pull_request.head.sha }}
# Full git history needed to get proper list of changed files
fetch-depth: 0

- name: Check links on new changes
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: ".github/linters/mlc_config.json"
check-modified-files-only: "yes"
use-quiet-mode: "yes"
use-verbose-mode: "yes"
base-branch: "main"
32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Lint

on:
pull_request:

jobs:
super-lint:
name: Lint with Super-Linter
runs-on: ubuntu-latest

steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v3
with:
# Make sure the actual branch is checked out when running on PR
ref: ${{ github.event.pull_request.head.sha }}
# Full git history needed to get proper list of changed files
fetch-depth: 0

# Runs the Super-Linter action
- name: Run Super-Linter on new changes
uses: docker://ghcr.io/github/super-linter:slim-v4
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MARKDOWN_CONFIG_FILE: .markdownlint.json
# Only check new or edited files
VALIDATE_ALL_CODEBASE: false
# Fail on errors
DISABLE_ERRORS: false
Loading