Skip to content

Commit

Permalink
Update metadata and build config
Browse files Browse the repository at this point in the history
  • Loading branch information
mabar committed Jun 20, 2024
1 parent 3fec7e8 commit 09c541d
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 37 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ tools export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
CHANGELOG-*.md export-ignore
Makefile export-ignore
README.md export-ignore
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"

- name: "PHP"
uses: "orisai/github-workflows/.github/actions/setup-php@v1"
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"

- name: "PHP"
uses: "orisai/github-workflows/.github/actions/setup-php@v1"
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"

- name: "PHP"
uses: "orisai/github-workflows/.github/actions/setup-php@v1"
Expand All @@ -143,7 +143,7 @@ jobs:
token: "${{ secrets.GITHUB_TOKEN }}"

- name: "Upload logs"
uses: "actions/upload-artifact@v3"
uses: "actions/upload-artifact@v4"
with:
name: "Logs - Tests (${{ matrix.operating-system }}, ${{ matrix.php-version }}, ${{ matrix.composer-flags }})"
path: "var/log"
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"

- name: "PHP"
uses: "orisai/github-workflows/.github/actions/setup-php@v1"
Expand All @@ -212,7 +212,7 @@ jobs:
stryker-token: "${{ secrets.STRYKER_DASHBOARD_API_KEY }}"

- name: "Upload logs"
uses: "actions/upload-artifact@v3"
uses: "actions/upload-artifact@v4"
with:
name: "Logs - Mutations"
path: "var/coverage/mutations/infection.log"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dependency-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"

- name: "Dependency Review"
uses: "actions/dependency-review-action@v3"
uses: "actions/dependency-review-action@v4"
with:
base-ref: "${{ github.event.before }}"
head-ref: "${{ github.sha }}"
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/orisai/openapi/compare/...HEAD)
## [Unreleased](https://github.com/orisai/openapi/compare/...v1.x)

### Added
31 changes: 22 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
_: list

# Config
## Config

PHPCS_CONFIG=tools/phpcs.xml
PHPSTAN_CONFIG=tools/phpstan.neon
PHPSTAN_BASELINE_CONFIG=tools/phpstan.baseline.neon
PHPUNIT_CONFIG=tools/phpunit.xml
INFECTION_CONFIG=tools/infection.json

# QA
## Install

qa: ## Check code quality - coding style and static analysis
make cs & make phpstan
update: ## Update all dependencies
make update-php

update-php: ## Update PHP dependencies
composer update

## QA

cs: ## Check PHP files coding style
mkdir -p var/tools/PHP_CodeSniffer
Expand All @@ -28,7 +33,7 @@ phpstan: ## Analyse code with PHPStan
phpstan-baseline: ## Add PHPStan errors to baseline
make phpstan ARGS="-b $(PHPSTAN_BASELINE_CONFIG)"

# Tests
## Tests

.PHONY: tests
tests: ## Run all tests
Expand Down Expand Up @@ -56,14 +61,22 @@ mutations-infection:
--skip-initial-tests \
$(ARGS)

# Utilities
## Utilities

.SILENT: $(shell grep -h -E '^[a-zA-Z_-]+:.*?$$' $(MAKEFILE_LIST) | sort -u | awk 'BEGIN {FS = ":.*?"}; {printf "%s ", $$1}')

LIST_PAD=20
list:
awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make \033[36m<target>\033[0m\n\nTargets:\n"}'
grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort -u | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-$(LIST_PAD)s\033[0m %s\n", $$1, $$2}'
awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make \033[36m<target>\033[0m\n"}'
@max_len=0; \
for target in $$(grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "} {print $$1}'); do \
len=$${#target}; \
if [ $$len -gt $$max_len ]; then \
max_len=$$len; \
fi \
done; \
awk -v max_len=$$max_len 'BEGIN {FS = ":.*?## "; last_section=""} \
/^## /{last_section=sprintf("\n\033[1m%s\033[0m", substr($$0, 4)); next} \
/^[a-zA-Z_-]+:.*?## /{if (last_section != "") { printf "%s\n", last_section; last_section=""; } printf " \033[36m%-*s\033[0m %s\n", max_len + 1, $$1, $$2}' $(MAKEFILE_LIST)

PRE_PHP=XDEBUG_MODE=off

Expand Down
24 changes: 6 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,12 @@
</p>

<p align="center">
<a href="https://github.com/orisai/openapi/actions?query=workflow%3ACI">
<img src="https://github.com/orisai/openapi/workflows/CI/badge.svg">
</a>
<a href="https://coveralls.io/r/orisai/openapi">
<img src="https://badgen.net/coveralls/c/github/orisai/openapi/v1.x?cache=300">
</a>
<a href="https://dashboard.stryker-mutator.io/reports/github.com/orisai/openapi/v1.x">
<img src="https://badge.stryker-mutator.io/github.com/orisai/openapi/v1.x">
</a>
<a href="https://packagist.org/packages/orisai/openapi">
<img src="https://badgen.net/packagist/dt/orisai/openapi?cache=3600">
</a>
<a href="https://packagist.org/packages/orisai/openapi">
<img src="https://badgen.net/packagist/v/orisai/openapi?cache=3600">
</a>
<a href="https://choosealicense.com/licenses/mpl-2.0/">
<img src="https://badgen.net/badge/license/MPL-2.0/blue?cache=3600">
</a>
<a href="https://github.com/orisai/openapi/actions?query=workflow:CI+branch:v1.x"><img src="https://github.com/orisai/openapi/actions/workflows/ci.yaml/badge.svg?branch=v1.x"></a>
<a href="https://coveralls.io/github/orisai/openapi?branch=v1.x"><img src="https://badgen.net/coveralls/c/github/orisai/openapi/v1.x?cache=300"></a>
<a href="https://dashboard.stryker-mutator.io/reports/github.com/orisai/openapi/v1.x"><img src="https://img.shields.io/endpoint?style=flat&url=https://badge-api.stryker-mutator.io/github.com/orisai/openapi/v1.x"></a>
<a href="https://packagist.org/packages/orisai/openapi"><img src="https://badgen.net/packagist/dt/orisai/openapi?cache=3600"></a>
<a href="https://packagist.org/packages/orisai/openapi"><img src="https://badgen.net/packagist/v/orisai/openapi?cache=3600"></a>
<a href="https://choosealicense.com/licenses/mpl-2.0/"><img src="https://badgen.net/badge/license/MPL-2.0/blue?cache=3600"></a>
<p>

##

0 comments on commit 09c541d

Please sign in to comment.