Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CI workflow for Laminas packages (and any PHP package you want to use it on)
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 }}
@weierophinney

This comment has been minimized.

Copy link
Owner Author

@weierophinney weierophinney commented Feb 10, 2021

To install:

$ mkdir -p .github/workflows ; cd  .github/workflows ; wget https://gist.githubusercontent.com/weierophinney/9decd19f76b7d9745c6559074053fa65/raw/6ffb33e59796cfec569405139aa65da9396ea5cd/continuous-integration.yml
$ git add .github/workflows/continuous-integration.yml
$ git commit
$ git push
@weierophinney

This comment has been minimized.

Copy link
Owner Author

@weierophinney weierophinney commented Mar 1, 2021

Some notes:

  • You should also add the composer.lock file to the repository! This MAY mean removing a composer.lock entry from the .gitignore file first.

  • Make sure you remove the .travis.yml file!

  • You can replace the README.md badges with the following:

    [![Build Status](https://github.com/laminas/laminas-{PACKAGE}/workflows/Continuous%20Integration/badge.svg)](https://github.com/laminas/laminas-{PACKAGE}/actions?query=workflow%3A"Continuous+Integration")
@Slamdunk

This comment has been minimized.

Copy link

@Slamdunk Slamdunk commented Mar 16, 2021

Does also .coveralls.yml need to be removed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment