Skip to content

Get CI as green as possible in an hour #202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/generate-clients.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ on:
pull_request:
jobs:
generate-and-test-client:
name: Continuous Integration
name: Continuous Integration (${{ matrix.client }})
strategy:
fail-fast: false
matrix:
client: ["miele", "one"]
client: ["miele", "one", "subsplit"]
uses: ./.github/workflows/test-client.yaml
with:
name: ${{ matrix.client }}
17 changes: 13 additions & 4 deletions .github/workflows/test-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
generate-and-test-client:
runs-on: ubuntu-latest
name: Generate and test client
name: Generate and test client (${{ inputs.name }})
container:
image: ghcr.io/wyrihaximusnet/php:8.2-nts-alpine-dev-root
steps:
Expand All @@ -18,6 +18,11 @@ jobs:
fetch-depth: '0'
persist-credentials: 'false'
- uses: "ramsey/composer-install@v2"
- run: |
mkdir -p example/generated-${{ inputs.name }}
- run: curl -o example/api.github.com.yaml https://raw.githubusercontent.com/github/rest-api-description/main/descriptions-next/api.github.com/api.github.com.yaml
- run: curl -o example/patch-broken-spec-files.php https://raw.githubusercontent.com/php-api-clients/github-root/main/utils/patch-broken-spec-files.php
- run: php example/patch-broken-spec-files.php example/api.github.com.yaml
- run: make generate-example-client-${{ inputs.name }}
- name: Tar example files
run: tar -czf example.tar ./example
Expand All @@ -27,7 +32,7 @@ jobs:
name: example-${{ inputs.name }}-client
path: ./example.tar
supported-versions-matrix:
name: Supported Versions Matrix
name: Supported Versions Matrix (${{ inputs.name }})
runs-on: ubuntu-latest
outputs:
version: ${{ steps.supported-versions-matrix.outputs.version }}
Expand All @@ -39,14 +44,16 @@ jobs:
with:
upcomingReleases: true
supported-checks-matrix:
name: Supported Checks Matrix
name: Supported Checks Matrix (${{ inputs.name }})
runs-on: ubuntu-latest
needs:
- generate-and-test-client
outputs:
check: ${{ steps.supported-checks-matrix.outputs.check }}
steps:
- uses: actions/checkout@v3
- run: |
mkdir -p example/generated-${{ inputs.name }}
- name: Download Generated Client
uses: actions/download-artifact@v3
with:
Expand All @@ -61,7 +68,7 @@ jobs:
printf "Checks found: %s\r\n" $(make task-list-ci)
printf "::set-output name=check::%s" $(make task-list-ci)
qa:
name: Run ${{ matrix.check }} on PHP ${{ matrix.php }} with ${{ matrix.composer }} dependency preference
name: Run ${{ matrix.check }} on PHP ${{ matrix.php }} with ${{ matrix.composer }} dependency preference (${{ inputs.name }})
strategy:
fail-fast: false
matrix:
Expand All @@ -80,6 +87,8 @@ jobs:
with:
fetch-depth: 0 # Required due to the way Git works, without it this action won't be able to find any or the correct tags
- run: git config --global --add safe.directory $GITHUB_WORKSPACE # Do this ourself because `actions/checkout@v3 doesn't succeed in doing this
- run: |
mkdir -p example/generated-${{ inputs.name }}
- name: Download Generated Client
uses: actions/download-artifact@v3
with:
Expand Down