Skip to content

Commit

Permalink
Setup github action
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy379 committed Sep 26, 2023
1 parent d3b8ffe commit 3090e75
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 97 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/php74.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/php80.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/php81.yml

This file was deleted.

24 changes: 16 additions & 8 deletions .github/workflows/php82.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
name: PHP 8.2
name: Test

on: push
on:
pull_request:
branches:
- "*"
push:
branches:
- "*"

jobs:
php80:
checks:
name: Check PHP 8.2
runs-on: ubuntu-latest

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

- name: Install dependencies
uses: php-actions/composer@v5
- name: Set up PHP 8.2
uses: shivammathur/setup-php@v2
with:
php_version: 8.2
args: --prefer-dist --ignore-platform-reqs
php-version: '8.2'

- name: Install Dependencies
run: composer install --prefer-dist --ignore-platform-reqs --no-interaction

- name: Check code styling
run: composer ecs-check

- name: Create keys
run: ./bin/create_keys
run: sh ./bin/create_keys

- name: Run unit and feature tests
run: composer test
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

[![PHP 8.2](https://github.com/jeremy379/laravel-openid-connect/actions/workflows/php82.yml/badge.svg)](https://github.com/jeremy379/laravel-openid-connect/actions/workflows/php82.yml)

# OpenID Connect for Laravel

OpenID Connect support to the PHP League's OAuth2 Server.
Expand Down
13 changes: 13 additions & 0 deletions bin/create_keys
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env sh

set -eu

if [ ! -f "$(pwd)/tmp/private.key" ]; then
mkdir -m 700 -p tmp

openssl genrsa -out tmp/private.key 2048
openssl rsa -in tmp/private.key -pubout -out tmp/public.key

chmod 600 tmp/private.key
chmod 644 tmp/public.key
fi
8 changes: 0 additions & 8 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,14 @@
use PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\CastSpacingSniff;
use PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\FunctionSpacingSniff;
use PhpCsFixer\Fixer\Operator\BinaryOperatorSpacesFixer;
use PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer;
use SlevomatCodingStandard\Sniffs\Arrays\TrailingArrayCommaSniff;
use SlevomatCodingStandard\Sniffs\Classes\ClassConstantVisibilitySniff;
use SlevomatCodingStandard\Sniffs\Classes\ClassMemberSpacingSniff;
use SlevomatCodingStandard\Sniffs\Classes\ConstantSpacingSniff;
use SlevomatCodingStandard\Sniffs\Classes\EmptyLinesAroundClassBracesSniff;
use SlevomatCodingStandard\Sniffs\Classes\PropertySpacingSniff;
use SlevomatCodingStandard\Sniffs\Classes\RequireConstructorPropertyPromotionSniff;
use SlevomatCodingStandard\Sniffs\Classes\TraitUseDeclarationSniff;
use SlevomatCodingStandard\Sniffs\Exceptions\DeadCatchSniff;
use SlevomatCodingStandard\Sniffs\Functions\RequireTrailingCommaInCallSniff;
use SlevomatCodingStandard\Sniffs\Functions\RequireTrailingCommaInDeclarationSniff;
use SlevomatCodingStandard\Sniffs\Namespaces\AlphabeticallySortedUsesSniff;
use SlevomatCodingStandard\Sniffs\Namespaces\UnusedUsesSniff;
use SlevomatCodingStandard\Sniffs\Namespaces\UseFromSameNamespaceSniff;
Expand All @@ -34,14 +30,10 @@
$services->set(FileHeaderSniff::class);
$services->set(TraitUseDeclarationSniff::class);
$services->set(DisallowLongArraySyntaxSniff::class);
$services->set(DeclareStrictTypesFixer::class);
$services->set(UnusedUsesSniff::class);
$services->set(UseFromSameNamespaceSniff::class);
$services->set(OptimizedFunctionsWithoutUnpackingSniff::class);
$services->set(DeadCatchSniff::class);
$services->set(RequireTrailingCommaInCallSniff::class);
$services->set(RequireTrailingCommaInDeclarationSniff::class);
$services->set(RequireConstructorPropertyPromotionSniff::class);
$services->set(AlphabeticallySortedUsesSniff::class);
$services->set(ClassConstantVisibilitySniff::class);
$services->set(TrailingArrayCommaSniff::class);
Expand Down

0 comments on commit 3090e75

Please sign in to comment.