Skip to content

Commit e3bdc3c

Browse files
authored
Merge pull request #26 from exonet/rja/add-github-actions
Add GitHub actions
2 parents 9f89bbd + 51c146f commit e3bdc3c

File tree

13 files changed

+371
-89
lines changed

13 files changed

+371
-89
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
We as members, contributors, and leaders pledge to make participation in our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, visible or invisible disability, ethnicity, sex characteristics, gender
9+
identity and expression, level of experience, education, socio-economic status,
10+
nationality, personal appearance, race, caste, color, religion, or sexual identity
11+
and orientation.
12+
13+
We pledge to act and interact in ways that contribute to an open, welcoming,
14+
diverse, inclusive, and healthy community.
15+
16+
## Our Standards
17+
18+
Examples of behavior that contributes to a positive environment for our
19+
community include:
20+
21+
* Demonstrating empathy and kindness toward other people
22+
* Being respectful of differing opinions, viewpoints, and experiences
23+
* Giving and gracefully accepting constructive feedback
24+
* Accepting responsibility and apologizing to those affected by our mistakes,
25+
and learning from the experience
26+
* Focusing on what is best not just for us as individuals, but for the
27+
overall community
28+
29+
Examples of unacceptable behavior include:
30+
31+
* The use of sexualized language or imagery, and sexual attention or
32+
advances of any kind
33+
* Trolling, insulting or derogatory comments, and personal or political attacks
34+
* Public or private harassment
35+
* Publishing others' private information, such as a physical or email
36+
address, without their explicit permission
37+
* Other conduct which could reasonably be considered inappropriate in a
38+
professional setting
39+
40+
## Enforcement Responsibilities
41+
42+
Community leaders are responsible for clarifying and enforcing our standards of
43+
acceptable behavior and will take appropriate and fair corrective action in
44+
response to any behavior that they deem inappropriate, threatening, offensive,
45+
or harmful.
46+
47+
Community leaders have the right and responsibility to remove, edit, or reject
48+
comments, commits, code, wiki edits, issues, and other contributions that are
49+
not aligned to this Code of Conduct, and will communicate reasons for moderation
50+
decisions when appropriate.
51+
52+
## Scope
53+
54+
This Code of Conduct applies within all community spaces, and also applies when
55+
an individual is officially representing the community in public spaces.
56+
Examples of representing our community include using an official e-mail address,
57+
posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event.
59+
60+
## Enforcement
61+
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63+
reported to the community leaders responsible for enforcement at
64+
65+
All complaints will be reviewed and investigated promptly and fairly.
66+
67+
All community leaders are obligated to respect the privacy and security of the
68+
reporter of any incident.
69+
70+
## Enforcement Guidelines
71+
72+
Community leaders will follow these Community Impact Guidelines in determining
73+
the consequences for any action they deem in violation of this Code of Conduct:
74+
75+
### 1. Correction
76+
77+
**Community Impact**: Use of inappropriate language or other behavior deemed
78+
unprofessional or unwelcome in the community.
79+
80+
**Consequence**: A private, written warning from community leaders, providing
81+
clarity around the nature of the violation and an explanation of why the
82+
behavior was inappropriate. A public apology may be requested.
83+
84+
### 2. Warning
85+
86+
**Community Impact**: A violation through a single incident or series
87+
of actions.
88+
89+
**Consequence**: A warning with consequences for continued behavior. No
90+
interaction with the people involved, including unsolicited interaction with
91+
those enforcing the Code of Conduct, for a specified period of time. This
92+
includes avoiding interactions in community spaces as well as external channels
93+
like social media. Violating these terms may lead to a temporary or
94+
permanent ban.
95+
96+
### 3. Temporary Ban
97+
98+
**Community Impact**: A serious violation of community standards, including
99+
sustained inappropriate behavior.
100+
101+
**Consequence**: A temporary ban from any sort of interaction or public
102+
communication with the community for a specified period of time. No public or
103+
private interaction with the people involved, including unsolicited interaction
104+
with those enforcing the Code of Conduct, is allowed during this period.
105+
Violating these terms may lead to a permanent ban.
106+
107+
### 4. Permanent Ban
108+
109+
**Community Impact**: Demonstrating a pattern of violation of community
110+
standards, including sustained inappropriate behavior, harassment of an
111+
individual, or aggression toward or disparagement of classes of individuals.
112+
113+
**Consequence**: A permanent ban from any sort of public interaction within
114+
the community.
115+
116+
## Attribution
117+
118+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119+
version 2.1, available at
120+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121+
122+
Community Impact Guidelines were inspired by
123+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124+
125+
For answers to common questions about this code of conduct, see the FAQ at
126+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
127+
at [https://www.contributor-covenant.org/translations][translations].
128+
129+
[homepage]: https://www.contributor-covenant.org
130+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131+
[Mozilla CoC]: https://github.com/mozilla/diversity
132+
[FAQ]: https://www.contributor-covenant.org/faq
133+
[translations]: https://www.contributor-covenant.org/translations

.github/CONTRIBUTING.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
We accept contributions via Pull Requests on [Github](https://github.com/exonet/exonet-api-python).
6+
7+
## Pull Requests
8+
9+
- **[PEP 8 Coding Standard](https://www.python.org/dev/peps/pep-0008/)**.
10+
11+
- **Document any change in behaviour** - Make sure the `README.rst` and any other relevant documentation are kept up-to-date.
12+
13+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public code is not an option.
14+
15+
- **Create feature branches** - Don't ask us to pull from your master branch.
16+
17+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
18+
19+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
20+
21+
---
22+
23+
**Happy coding**!

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: daily
8+
time: "04:00"

.github/labels.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
- name: "breaking-change"
3+
color: ee0701
4+
description: "A breaking change for existing users."
5+
- name: "bugfix"
6+
color: ee0701
7+
description: "Inconsistencies or issues which will cause a problem for users or implementors."
8+
- name: "documentation"
9+
color: 0052cc
10+
description: "Solely about the documentation of the project."
11+
- name: "enhancement"
12+
color: 1d76db
13+
description: "Enhancement of the code, not introducing new features."
14+
- name: "refactor"
15+
color: 1d76db
16+
description: "Improvement of existing code, not introducing new features."
17+
- name: "performance"
18+
color: 1d76db
19+
description: "Improving performance, not introducing new features."
20+
- name: "new-feature"
21+
color: 0e8a16
22+
description: "New features or options."
23+
- name: "maintenance"
24+
color: 2af79e
25+
description: "Generic maintenance tasks."
26+
- name: "ci"
27+
color: 1d76db
28+
description: "Work that improves the continue integration."
29+
- name: "dependencies"
30+
color: 1d76db
31+
description: "Upgrade or downgrade of project dependencies."
32+
33+
- name: "in-progress"
34+
color: fbca04
35+
description: "Issue is currently being resolved by a developer."
36+
37+
- name: "security"
38+
color: ee0701
39+
description: "Marks a security issue that needs to be resolved asap."
40+
- name: "incomplete"
41+
color: fef2c0
42+
description: "Marks a PR or issue that is missing information."
43+
- name: "invalid"
44+
color: fef2c0
45+
description: "Marks a PR or issue that is missing information."
46+
47+
- name: "major"
48+
color: b60205
49+
description: "This PR causes a major version bump in the version number."
50+
- name: "minor"
51+
color: 0e8a16
52+
description: "This PR causes a minor version bump in the version number."

.github/release-drafter.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name-template: "v$RESOLVED_VERSION"
3+
tag-template: "v$RESOLVED_VERSION"
4+
change-template: "- #$NUMBER $TITLE @$AUTHOR"
5+
sort-direction: ascending
6+
7+
categories:
8+
- title: "🚨 Breaking changes"
9+
labels:
10+
- "breaking-change"
11+
- title: "✨ New features"
12+
labels:
13+
- "new-feature"
14+
- title: "🐛 Bug fixes"
15+
labels:
16+
- "bugfix"
17+
- title: "🚀 Enhancements"
18+
labels:
19+
- "enhancement"
20+
- "refactor"
21+
- "performance"
22+
- title: "🧰 Maintenance"
23+
labels:
24+
- "maintenance"
25+
- "ci"
26+
- "security"
27+
- title: "📚 Documentation"
28+
labels:
29+
- "documentation"
30+
- title: "⬆️ Dependency updates"
31+
labels:
32+
- "dependencies"
33+
34+
version-resolver:
35+
major:
36+
labels:
37+
- "major"
38+
- "breaking-change"
39+
minor:
40+
labels:
41+
- "minor"
42+
- "new-feature"
43+
patch:
44+
labels:
45+
- "bugfix"
46+
- "ci"
47+
- "dependencies"
48+
- "documentation"
49+
- "enhancement"
50+
- "performance"
51+
- "refactor"
52+
default: patch
53+
54+
template: |
55+
## What’s changed
56+
57+
$CHANGES

.github/workflows/codeql.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: CodeQL
3+
4+
# yamllint disable-line rule:truthy
5+
on:
6+
push:
7+
branches: master
8+
pull_request:
9+
branches: master
10+
schedule:
11+
- cron: "30 1 * * 0"
12+
13+
jobs:
14+
codeql:
15+
name: Scanning
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
language: ["python"]
22+
23+
steps:
24+
- name: 📥 Checkout repository
25+
uses: actions/checkout@v2
26+
27+
- name: 🏗 Initialize CodeQL
28+
uses: github/codeql-action/init@v1
29+
30+
- name: 🚀 Perform CodeQL Analysis
31+
uses: github/codeql-action/analyze@v1
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Release Drafter
3+
4+
# yamllint disable-line rule:truthy
5+
on:
6+
push:
7+
branches:
8+
- master
9+
10+
jobs:
11+
update_release_draft:
12+
name: ✏️ Draft release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: 🚀 Run Release Drafter
16+
uses: release-drafter/[email protected]
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/labels.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Sync Labels
3+
4+
# yamllint disable-line rule:truthy
5+
on:
6+
workflow_dispatch:
7+
push:
8+
branches:
9+
- master
10+
paths:
11+
- .github/labels.yml
12+
13+
jobs:
14+
labels:
15+
name: ♻️ Sync labels
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: 📥 Checkout repository
19+
uses: actions/checkout@v2
20+
21+
- name: 🚀 Run Label Syncer
22+
uses: micnncim/action-label-syncer@v1
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr-labels.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: PR
3+
4+
# yamllint disable-line rule:truthy
5+
on:
6+
pull_request_target:
7+
types: [opened, labeled, unlabeled, synchronize]
8+
9+
jobs:
10+
verify_pr_labels:
11+
name: 🏷 Verify Labels
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: ✅ Verify PR has a valid label
15+
uses: jesusvasquez333/[email protected]
16+
with:
17+
github-token: "${{ secrets.GITHUB_TOKEN }}"
18+
pull-request-number: "${{ github.event.pull_request.number }}"
19+
valid-labels: >-
20+
breaking-change, bugfix, documentation, enhancement,
21+
refactor, performance, new-feature, maintenance, ci, dependencies
22+
disable-reviews: true

0 commit comments

Comments
 (0)