Skip to content

Commit

Permalink
Prepare release (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
HypeMC authored Oct 22, 2024
1 parent d89d14b commit d22cffa
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 53 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@ env:

jobs:
composer:
# runs-on: ubuntu-latest TODO change this when going public
runs-on: [ self-hosted, k8s ]
runs-on: ubuntu-latest
name: Composer Validations
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
env:
runner: self-hosted # TODO remove this when going public
with:
php-version: ${{ env.PHP_VERSION }}
coverage: none
Expand All @@ -37,17 +34,14 @@ jobs:
run: composer dump --optimize --strict-psr

php-cs-fixer:
# runs-on: ubuntu-latest TODO change this when going public
runs-on: [ self-hosted, k8s ]
runs-on: ubuntu-latest
name: Coding Standards
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
env:
runner: self-hosted # TODO remove this when going public
with:
php-version: ${{ env.PHP_VERSION }}
coverage: none
Expand All @@ -57,17 +51,14 @@ jobs:
run: php-cs-fixer fix --dry-run --format checkstyle | cs2pr

psalm:
# runs-on: ubuntu-latest TODO change this when going public
runs-on: [ self-hosted, k8s ]
runs-on: ubuntu-latest
name: Static Analysis (Psalm)
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
env:
runner: self-hosted # TODO remove this when going public
with:
php-version: ${{ env.PHP_VERSION }}
coverage: none
Expand All @@ -82,17 +73,14 @@ jobs:
run: psalm --long-progress --no-diff --output-format=github

phpstan:
# runs-on: ubuntu-latest TODO change this when going public
runs-on: [ self-hosted, k8s ]
runs-on: ubuntu-latest
name: Static Analysis (PHPStan)
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
env:
runner: self-hosted # TODO remove this when going public
with:
php-version: ${{ env.PHP_VERSION }}
coverage: none
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ concurrency:

jobs:
phpunit:
# runs-on: ubuntu-latest TODO change this when going public
runs-on: [ self-hosted, k8s ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Expand All @@ -28,9 +27,6 @@ jobs:
services:
postgres:
image: postgres:16
credentials: # TODO remove this when going public
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
env:
POSTGRES_DB: purgatory
POSTGRES_PASSWORD: password
Expand All @@ -50,14 +46,10 @@ jobs:

- name: Setup PHP
uses: shivammathur/setup-php@v2
env:
runner: self-hosted # TODO remove this when going public
with:
php-version: ${{ matrix.php }}
ini-values: zend.exception_ignore_args=false
tools: flex
extensions: sqlite # TODO remove this when going public
coverage: xdebug # TODO remove this when going public

- name: Install Dependencies
uses: ramsey/composer-install@v2
Expand Down
43 changes: 21 additions & 22 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Contributor Covenant Code of Conduct

## Our Pledge
Expand All @@ -7,8 +6,8 @@ We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
Expand All @@ -23,17 +22,17 @@ community include:
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

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

Expand Down Expand Up @@ -61,7 +60,7 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[INSERT CONTACT METHOD].
<[email protected]>.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand All @@ -83,15 +82,15 @@ behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.
**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

Expand All @@ -107,27 +106,27 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.
**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
52 changes: 49 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Latest Stable Version](https://poser.pugx.org/sofascore/purgatory-bundle/v/stable)](https://packagist.org/packages/sofascore/purgatory-bundle)
[![License](https://poser.pugx.org/sofascore/purgatory-bundle/license)](https://packagist.org/packages/sofascore/purgatory-bundle)

TODO description
A Symfony bundle for creating and sending cache purge requests to HTTP cache backends like Varnish.

## Features

Expand All @@ -27,8 +27,54 @@ TODO description
configuration file:

```yaml
TODO
bin/console config:dump-reference
purgatory:
# List of files or directories where Purgatory will look for additional purge definitions.
mapping_paths: []
# Route names that match the given regular expressions will be ignored.
route_ignore_patterns: []
# Examples:
# - /^_profiler/
# - /^_wdt/
doctrine_middleware:
enabled: true
# Explicitly set the priority of Purgatory's Doctrine middleware.
priority: null
# Explicitly set the priorities of Purgatory's Doctrine event listener.
doctrine_event_listener_priorities:
preRemove: null
postPersist: null
postUpdate: null
# This event is not registered when the Doctrine middleware is enabled.
postFlush: null
purger:
# The ID of a service that implements the "Sofascore\PurgatoryBundle\Purger\PurgerInterface" interface
name: null # Example: symfony
# The hosts from which URLs should be purged
hosts: []
# The service ID of the HTTP client to use, must be an instance of Symfony's HTTP client
http_client: null
messenger:
# Set the name of the messenger transport to use
transport: null
# Set the name of the messenger bus to use
bus: null
# Set the number of urls to dispatch per message
batch_size: null
# Enables the data collector and profiler panel if the profiler is enabled.
profiler_integration: true
```

1. Enable the bundle in `config/bundles.php` by adding it to the array:
Expand Down
12 changes: 9 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{
"name": "sofascore/purgatory-bundle",
"description": "Library for easy construction of cache purge requests.",
"description": "A Symfony bundle for creating and sending cache purge requests to HTTP cache backends like Varnish.",
"type": "symfony-bundle",
"keywords": [
"todo",
"todo"
"cache",
"caching",
"http",
"http-cache",
"http-caching",
"invalidation",
"purge",
"varnish"
],
"license": "MIT",
"authors": [
Expand Down

0 comments on commit d22cffa

Please sign in to comment.