Skip to content

Commit

Permalink
qa: switch to Laminas CI and Release workflows
Browse files Browse the repository at this point in the history
- Adds CI workflow
- Adds Release workflow
- Changes badge in README
- Removes branch aliases from package description
- Minor changes in documentation following linting results

Signed-off-by: Matthew Weier O'Phinney <[email protected]>
  • Loading branch information
weierophinney committed Feb 10, 2021
1 parent 5b5c7dc commit a3acd07
Show file tree
Hide file tree
Showing 9 changed files with 122 additions and 20 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Continuous Integration"

on:
pull_request:
push:
branches:
- '[0-9]+.[0-9]+.x'
- 'refs/pull/*'
tags:

jobs:
matrix:
name: Generate job matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- name: Gather CI configuration
id: matrix
uses: laminas/laminas-ci-matrix-action@v1

qa:
name: QA Checks
needs: [matrix]
runs-on: ${{ matrix.operatingSystem }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }}
steps:
- name: ${{ matrix.name }}
uses: laminas/laminas-continuous-integration-action@v1
with:
job: ${{ matrix.job }}
71 changes: 71 additions & 0 deletions .github/workflows/release-on-milestone-closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Alternate workflow example.
# This one is identical to the one in release-on-milestone.yml, with one change:
# the Release step uses the ORGANIZATION_ADMIN_TOKEN instead, to allow it to
# trigger a release workflow event. This is useful if you have other actions
# that intercept that event.

name: "Automatic Releases"

on:
milestone:
types:
- "closed"

jobs:
release:
name: "GIT tag, release & create merge-up PR"
runs-on: ubuntu-latest

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Release"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:release"
env:
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create Merge-Up Pull Request"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:create-merge-up-pull-request"
env:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create and/or Switch to new Release Branch"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:switch-default-branch-to-next-minor"
env:
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Bump Changelog Version On Originating Release Branch"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:bump-changelog"
env:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create new milestones"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:create-milestones"
env:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# laminas-config

[![Build Status](https://travis-ci.com/laminas/laminas-config.svg?branch=master)](https://travis-ci.com/laminas/laminas-config)
[![Coverage Status](https://coveralls.io/repos/github/laminas/laminas-config/badge.svg?branch=master)](https://coveralls.io/github/laminas/laminas-config?branch=master)
[![Build Status](https://github.com/laminas/laminas-config/workflows/Continuous%20Integration/badge.svg)](https://github.com/laminas/laminas-config/actions?query=workflow%3A"Continuous+Integration")

laminas-config is designed to simplify access to configuration data within
applications. It provides a nested object property-based user interface for
Expand Down
6 changes: 0 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
"config": {
"sort-packages": true
},
"extra": {
"branch-alias": {
"dev-master": "3.4.x-dev",
"dev-develop": "3.5.x-dev"
}
},
"require": {
"php": "^7.3 || ^8.0",
"ext-json": "*",
Expand Down
1 change: 1 addition & 0 deletions docs/book/factory.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ array or to a `Laminas\Config\Config` object. The factory has two purposes
- Loading configuration file(s)
- Storing a configuration file

<!-- markdownlint-disable-next-line header-increment -->
> ### Storage writes to a single file
>
> Storing the configuration always writes to a **single** file. The factory is
Expand Down
2 changes: 2 additions & 0 deletions docs/book/processor.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ laminas-config provides the following concrete implementations:
- `Laminas\Config\Processor\Token`: find and replace specific tokens.
- `Laminas\Config\Processor\Translator`: translate configuration values in other languages using `Laminas\I18n\Translator`.

<!-- markdownlint-disable-next-line header-increment -->
> ### What gets processed?
>
> Typically, you will process configuration _values_. However, there are use
Expand Down Expand Up @@ -186,6 +187,7 @@ print_r($config->toArray());
// [vhost] => /
// )
```

Do note, however, that only values present in environment will be replaced.
This allows multiple fallback processors to be provided as a queue.

Expand Down
5 changes: 3 additions & 2 deletions docs/book/reader.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ concrete implementations of this interface are:
`fromFile()` and `fromString()` are expected to return a PHP array containing
the data from the specified configuration.

<!-- markdownlint-disable-next-line header-increment -->
> ### Differences from Laminas1
>
> The `Laminas\Config\Reader` component no longer supports the following features:
>
> * Inheritance of sections.
> * Reading of specific sections.
> - Inheritance of sections.
> - Reading of specific sections.
## Laminas\\Config\\Reader\\Ini

Expand Down
1 change: 1 addition & 0 deletions docs/book/theory.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ is itself an array, then the resulting object property is created as a new
recursively, such that a hierarchy of configuration data may be created with any
number of levels.

<!-- markdownlint-disable-next-line header-increment -->
> ### Extending `Laminas\Config\Config` class
>
> If you decide to extend `Laminas\Config\Config` class, each property (subnode)
Expand Down
20 changes: 10 additions & 10 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
docs_dir: docs/book
site_dir: docs/html
nav:
- Home: index.md
- Introduction: intro.md
- "Theory of Operation": theory.md
- Reference:
- "Laminas\\Config\\Reader": reader.md
- "Laminas\\Config\\Writer": writer.md
- "Laminas\\Config\\Processor": processor.md
- "Config Factory": factory.md
- Migration:
- "To version 3": migration/to-v3.md
- Home: index.md
- Introduction: intro.md
- "Theory of Operation": theory.md
- Reference:
- "Laminas\\Config\\Reader": reader.md
- "Laminas\\Config\\Writer": writer.md
- "Laminas\\Config\\Processor": processor.md
- "Config Factory": factory.md
- Migration:
- "To version 3": migration/to-v3.md
site_name: laminas-config
site_description: Laminas\Config
repo_url: 'https://github.com/laminas/laminas-config'
Expand Down

0 comments on commit a3acd07

Please sign in to comment.