Skip to content

Commit e309466

Browse files
committed
github workflows
1 parent 0bca116 commit e309466

File tree

7 files changed

+247
-0
lines changed

7 files changed

+247
-0
lines changed

.github/CONTRIBUTING.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Contributing
2+
3+
Welcome to Pingora! Before you make a contribution, be it a bug report, documentation improvement,
4+
pull request (PR), etc., please read and follow these guidelines.
5+
6+
## Start with filing an issue
7+
8+
More often than not, **start by filing an issue on GitHub**. If you have a bug report or feature
9+
request, open a GitHub issue. Non-trivial PRs will also require a GitHub issue. The issue provides
10+
us with a space to discuss proposed changes with you and the community.
11+
12+
Having a discussion via GitHub issue upfront is the best way to ensure your contribution lands in
13+
Pingora. We don't want you to spend your time making a PR, only to find that we won't accept it on
14+
a design basis. For example, we may find that your proposed feature works better as a third-party
15+
module built on top of or for use with Pingora and encourage you to pursue that direction instead.
16+
17+
**You do not need to file an issue for small fixes.** What counts as a "small" or trivial fix is a
18+
judgment call, so here's a few examples to clarify:
19+
- fixing a typo
20+
- refactoring a bit of code
21+
- most documentation or comment edits
22+
23+
Still, _sometimes_ we may review your PR and ask you to file an issue if we expect there are larger
24+
design decisions to be made.
25+
26+
## Making a PR
27+
28+
After you've filed an issue, you can make your PR referencing that issue number. Once you open your
29+
PR, it will be labelled _needs review_. A maintainer will review your PR as soon as they can. The
30+
reviewer may ask for changes - they will mark the PR as _changes requested_ and _work in progress_
31+
and will give you details about the requested changes. Feel free to ask lots of questions! The
32+
maintainers are there to help you.
33+
34+
### Caveats
35+
36+
Currently, internal contributions will take priority. Today Pingora is being maintained by
37+
Cloudflare's Content Delivery team, and internal Cloudflare proxy services are a primary user of
38+
Pingora. We value the community's work on Pingora, but the reality is that our team has a limited
39+
amount of resources and time. We can't promise we will review or address all PRs or issues in a
40+
timely manner.
41+
42+
## Conduct
43+
44+
Pingora and Cloudflare OpenSource generally follows the [Contributor Covenant Code of Conduct].
45+
Violating the CoC could result in a warning or a ban to Pingora or any and all repositories in the Cloudflare organization.
46+
47+
[Contributor Covenant Code of Conduct]: https://github.com/cloudflare/.github/blob/26b37ca2ba7ab3d91050ead9f2c0e30674d3b91e/CODE_OF_CONDUCT.md
48+
49+
## Contact
50+
51+
If you have any questions, please reach out to [[email protected]](mailto:[email protected]).

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug Report
3+
about: Report an issue to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
## Describe the bug
10+
11+
A clear and concise description of what the bug is.
12+
13+
## Pingora info
14+
15+
Please include the following information about your environment:
16+
17+
**Pingora version**: release number of commit hash
18+
**Rust version**: i.e. `cargo --version`
19+
**Operating system version**: e.g. Ubuntu 22.04, Debian 12.4
20+
21+
## Steps to reproduce
22+
23+
Please provide step-by-step instructions to reproduce the issue. Include any relevant code
24+
snippets.
25+
26+
## Expected results
27+
28+
What were you expecting to happen?
29+
30+
## Observed results
31+
32+
What actually happened?
33+
34+
## Additional context
35+
36+
What other information would you like to provide? e.g. screenshots, how you're working around the
37+
issue, or other clues you think could be helpful to identify the root cause.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Feature request
3+
about: Propose a new feature
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
## What is the problem your feature solves, or the need it fulfills?
10+
11+
A clear and concise description of why this feature should be added. What is the problem? Who is
12+
this for?
13+
14+
## Describe the solution you'd like
15+
16+
What do you propose to resolve the problem or fulfill the need above? How would you like it to
17+
work?
18+
19+
## Describe alternatives you've considered
20+
21+
What other solutions, features, or workarounds have you considered that might also solve the issue?
22+
What are the tradeoffs for these alternatives compared to what you're proposing?
23+
24+
## Additional context
25+
26+
This could include references to documentation or papers, prior art, screenshots, or benchmark
27+
results.

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: cargo
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "13:00"
8+
open-pull-requests-limit: 10

.github/workflows/audit.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Audit Dependencies"
2+
on:
3+
push:
4+
paths:
5+
# Run if workflow changes
6+
- '.github/workflows/audit.yml'
7+
# Run on changed dependencies
8+
- '**/Cargo.toml'
9+
- '**/Cargo.lock'
10+
# Run if the configuration file changes
11+
- '**/audit.toml'
12+
# Rerun periodicly to pick up new advisories
13+
schedule:
14+
- cron: '0 0 * * *'
15+
# Run manually
16+
workflow_dispatch:
17+
18+
jobs:
19+
audit:
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
issues: write
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: actions-rust-lang/audit@v1
27+
name: Audit Rust Dependencies

.github/workflows/docs.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
6+
name: Docs
7+
8+
jobs:
9+
docs:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout sources
13+
uses: actions/checkout@v3
14+
with:
15+
submodules: 'recursive'
16+
17+
- name: Install build dependencies
18+
run: |
19+
sudo apt update
20+
sudo apt install -y cmake libclang-dev
21+
22+
- name: Install stable toolchain
23+
uses: actions-rs/toolchain@v1
24+
with:
25+
profile: minimal
26+
toolchain: stable
27+
override: true
28+
default: true
29+
30+
- name: Run cargo doc
31+
uses: actions-rs/cargo@v1
32+
with:
33+
command: doc
34+
args: --no-deps --all-features

.github/workflows/stable.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
on: [push, pull_request]
2+
3+
name: Stable
4+
5+
jobs:
6+
pingora:
7+
runs-on: ubuntu-latest
8+
# Only run on "pull_request" event for external PRs. This is to avoid
9+
# duplicate builds for PRs created from internal branches.
10+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
11+
steps:
12+
- name: Checkout sources
13+
uses: actions/checkout@v3
14+
with:
15+
submodules: 'recursive'
16+
17+
- name: Install build dependencies
18+
run: |
19+
sudo apt update
20+
sudo apt install -y cmake libclang-dev
21+
22+
- name: Install toolchain
23+
uses: actions-rs/toolchain@v1
24+
with:
25+
toolchain: stable
26+
components: rustfmt, clippy,
27+
override: true
28+
default: true
29+
30+
- name: Run cargo fmt
31+
uses: actions-rs/cargo@v1
32+
with:
33+
command: fmt
34+
args: -- --check
35+
36+
- name: Run cargo test
37+
uses: actions-rs/cargo@v1
38+
with:
39+
command: test
40+
args: --verbose --lib --bins --tests --no-fail-fast
41+
42+
# Need to run doc tests separately.
43+
# (https://github.com/rust-lang/cargo/issues/6669)
44+
- name: Run cargo doc test
45+
uses: actions-rs/cargo@v1
46+
with:
47+
command: test
48+
args: --verbose --doc
49+
50+
- name: Run cargo clippy
51+
uses: actions-rs/cargo@v1
52+
with:
53+
command: clippy
54+
args: --all-targets --all -- --deny=warnings
55+
56+
- name: Run cargo audit
57+
uses: actions-rust-lang/audit@v1
58+
59+
- name: Run cargo doc
60+
uses: actions-rs/cargo@v1
61+
with:
62+
command: doc
63+
args: --no-deps --all-features --document-private-items

0 commit comments

Comments
 (0)