Skip to content

Commit

Permalink
ci: bump github actions and align with cas-bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Oct 6, 2023
1 parent 25a282b commit 8cf4dc2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 38 deletions.
56 changes: 23 additions & 33 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,50 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

on:
- pull_request
- push
push:
pull_request:

name: "Continuous Integration"

jobs:
run:
name: "Grumphp"
supported-versions-matrix:
name: Supported Versions Matrix
runs-on: ubuntu-latest
outputs:
version: ${{ steps.supported-versions-matrix.outputs.version }}
steps:
- uses: actions/checkout@v4
- id: supported-versions-matrix
uses: WyriHaximus/github-action-composer-php-versions-in-range@v1
tests:
name: "Unit Tests"
runs-on: ${{ matrix.operating-system }}
needs:
- supported-versions-matrix
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ["8.1"]

php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: xdebug,mbstring

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v3
uses: shivammathur/setup-php@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
php-version: ${{ matrix.php }}
coverage: pcov

- name: Install dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
uses: ramsey/composer-install@v2

- name: Run Grumphp
run: vendor/bin/grumphp run
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

- name: Send PSALM data
run: vendor/bin/psalm --shepherd --stats
continue-on-error: true

- name: Infection score report
run: |
vendor/bin/infection run -j 2
continue-on-error: true
PHP_CS_FIXER_IGNORE_ENV: 1
run: vendor/bin/grumphp run
4 changes: 2 additions & 2 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install the Nix package manager
uses: cachix/install-nix-action@v22
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main

- name: Checks
run: nix run nixpkgs#nodePackages.prettier -- --check .
4 changes: 1 addition & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Determine tag
id: tag_name
run: |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/}
echo "current_version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
shell: bash

- name: Get Changelog Entry
Expand Down

0 comments on commit 8cf4dc2

Please sign in to comment.