Skip to content

Commit

Permalink
[general] Use reusable workflows (#247)
Browse files Browse the repository at this point in the history
* Use reusable workflows

* Updating config

* CI config
  • Loading branch information
akadlec authored Feb 26, 2024
1 parent 5b1addc commit 2edea62
Show file tree
Hide file tree
Showing 151 changed files with 4,983 additions and 11,662 deletions.
476 changes: 0 additions & 476 deletions .github/workflows/ci.yaml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "Code Linting"

on:
pull_request:
paths-ignore:
- "docs/**"
push:
branches:
- "main"
tags:
- v*
schedule:
- cron: "0 8 * * 1" # At 08:00 on Monday

env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.ORGANIZATION_ACCESS_TOKEN }}"}}'

jobs:
php:
name: "PHP Lint"

uses: "fastybird/.github/.github/workflows/php-lint.yaml@main"
secrets: inherit
with:
php: "${{ matrix.php-version }}"

strategy:
fail-fast: false
matrix:
php-version: [ "8.2" ]
operating-system: [ "ubuntu-latest" ]

js:
name: "JS Lint"

uses: "fastybird/.github/.github/workflows/lerna-js-lint.yaml@main"
secrets: inherit
with:
node: "${{ matrix.node-version }}"

strategy:
fail-fast: false
matrix:
node-version: [ "20" ]
operating-system: [ "ubuntu-latest" ]
File renamed without changes.
45 changes: 45 additions & 0 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "Code quality assurance"

on:
pull_request:
paths-ignore:
- "docs/**"
push:
branches:
- "main"
tags:
- v*
schedule:
- cron: "0 8 * * 1" # At 08:00 on Monday

env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.ORGANIZATION_ACCESS_TOKEN }}"}}'

jobs:
php:
name: "PHP Code quality assurance"

uses: "fastybird/.github/.github/workflows/php-cs.yaml@main"
secrets: inherit
with:
php: "${{ matrix.php-version }}"

strategy:
fail-fast: false
matrix:
php-version: [ "8.2" ]
operating-system: [ "ubuntu-latest" ]

js:
name: "JS Code quality assurance"

uses: "fastybird/.github/.github/workflows/prettier.yaml@main"
secrets: inherit
with:
node: "${{ matrix.node-version }}"

strategy:
fail-fast: false
matrix:
node-version: [ "20" ]
operating-system: [ "ubuntu-latest" ]
45 changes: 45 additions & 0 deletions .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "Code Static Analysis"

on:
pull_request:
paths-ignore:
- "docs/**"
push:
branches:
- "main"
tags:
- v*
schedule:
- cron: "0 8 * * 1" # At 08:00 on Monday

env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.ORGANIZATION_ACCESS_TOKEN }}"}}'

jobs:
phpstan:
name: "PHP Lint"

uses: "fastybird/.github/.github/workflows/phpstan.yaml@main"
secrets: inherit
with:
php: "${{ matrix.php-version }}"

strategy:
fail-fast: false
matrix:
php-version: [ "8.2" ]
operating-system: [ "ubuntu-latest" ]

js:
name: "JS Lint"

uses: "fastybird/.github/.github/workflows/lerna-js-types.yaml@main"
secrets: inherit
with:
node: "${{ matrix.node-version }}"

strategy:
fail-fast: false
matrix:
node-version: [ "20" ]
operating-system: [ "ubuntu-latest" ]
66 changes: 66 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: "PHP Tester"

on:
pull_request:
paths-ignore:
- "docs/**"
push:
branches:
- "main"
tags:
- v*
schedule:
- cron: "0 8 * * 1" # At 08:00 on Monday

env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.ORGANIZATION_ACCESS_TOKEN }}"}}'

jobs:
tests:
name: "PHP Tests"

uses: "fastybird/.github/.github/workflows/phpunit.yaml@main"
secrets: inherit
with:
php: "${{ matrix.php-version }}"

strategy:
fail-fast: false
matrix:
php-version: [ "8.2" ]
operating-system: [ "ubuntu-latest" ]

code-coverage:
name: "PHP Tests With Code Coverage"
needs: [ "tests" ]

if: "github.event_name == 'push'"

uses: "fastybird/.github/.github/workflows/phpunit.yaml@main"
secrets: inherit
with:
php: "${{ matrix.php-version }}"
coverage: true

strategy:
fail-fast: false
matrix:
php-version: [ "8.2" ]
operating-system: [ "ubuntu-latest" ]

mutations:
name: "PHP Tests For Mutants"
needs: [ "tests" ]

if: "github.event_name == 'push'"

uses: "fastybird/.github/.github/workflows/mutations.yaml@main"
secrets: inherit
with:
php: "${{ matrix.php-version }}"

strategy:
fail-fast: false
matrix:
php-version: [ "8.2" ]
operating-system: [ "ubuntu-latest" ]
Loading

0 comments on commit 2edea62

Please sign in to comment.