Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
135 changes: 135 additions & 0 deletions .github/workflows/test-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: Test Pull Request

on:
pull_request:
branches:
- develop

jobs:
unit:
name: Unit Tests
runs-on: ubuntu-latest
steps:

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: stable

- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'true'
fetch-depth: 0

- name: Run Unit Tests
run: ./scripts/unit.sh

integration-matrix:
name: Integration Matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
needs: unit
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'true'

- name: Set Matrix
id: set-matrix
run: |
matrix="$(jq -r -c '.integration.matrix' ./config.json)"
printf "Output: matrix=%s\n" "${matrix}"
printf "matrix=%s\n" "${matrix}" >> "$GITHUB_OUTPUT"

integration:
name: Integration Test
runs-on: ubuntu-latest
needs: integration-matrix
strategy:
matrix:
include: ${{ fromJSON(needs.integration-matrix.outputs.matrix) }}
steps:

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: stable

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'true'

- name: Run Integration Tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./scripts/integration.sh \
--platform docker \
--github-token "${GITHUB_TOKEN}" \
--cached ${{ matrix.cached }} \
--parallel ${{ matrix.parallel }}

roundup:
name: Integration Tests
if: ${{ always() }}
runs-on: ubuntu-latest
needs: integration
steps:
- run: |
result="${{ needs.integration.result }}"
if [[ "${result}" == "success" ]]; then
echo "All integration tests passed"
exit 0
else
echo "One or more integration tests failed"
exit 1
fi

approve:
name: Approve Bot PRs
if: ${{ github.event.pull_request.user.login == 'cf-buildpacks-eng' || github.event.pull_request.user.login == 'dependabot[bot]' }}
runs-on: ubuntu-latest
needs: roundup
steps:

- name: Check Commit Verification
id: unverified-commits
uses: paketo-buildpacks/github-config/actions/pull-request/check-unverified-commits@main
with:
token: ${{ secrets.CF_BOT_GITHUB_TOKEN }}
repo: ${{ github.repository }}
number: ${{ github.event.number }}

- name: Check for Human Commits
id: human-commits
uses: paketo-buildpacks/github-config/actions/pull-request/check-human-commits@main
with:
token: ${{ secrets.CF_BOT_GITHUB_TOKEN }}
repo: ${{ github.repository }}
number: ${{ github.event.number }}
bots: 'dependabot[bot],web-flow,cf-buildpacks-eng'

- name: Checkout
if: steps.human-commits.outputs.human_commits == 'false' && steps.unverified-commits.outputs.unverified_commits == 'false'
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Dispatch
if: steps.human-commits.outputs.human_commits == 'false' && steps.unverified-commits.outputs.unverified_commits == 'false'
uses: paketo-buildpacks/github-config/actions/dispatch@main
with:
repos: ${{ github.repository }}
token: ${{ secrets.CF_BOT_GITHUB_TOKEN }}
event: approve-bot-pr
payload: |
{
"number": "${{ github.event.pull_request.number }}",
"login": "${{ github.event.pull_request.user.login }}",
"tracker_story": "${{ steps.story-id.outputs.story_id }}"
}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ binaries/precise/*
binaries/trusty/*
!binaries/trusty/index*.json
*.pyc
*.so
*.swp
/env
*_buildpack*.zip
Expand Down
17 changes: 15 additions & 2 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
{
"stack": "cflinuxfs3",
"stack": "cflinuxfs4",
"oses": [
"linux"
]
],
"integration": {
"harness": "switchblade",
"matrix": [
{
"cached": false,
"parallel": true
},
{
"cached": true,
"parallel": true
}
]
}
}
7 changes: 7 additions & 0 deletions fixtures/cake/.bp-config/options.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"COMPOSER_VENDOR_DIR": "vendor",
"COMPOSER_INSTALL_OPTIONS": ["--no-interaction"],
"WEBDIR": "webroot",
"LIBDIR": "library",
"PHP_EXTENSIONS": ["pdo", "pdo_sqlite", "mcrypt", "pdo_mysql"]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 0 additions & 7 deletions fixtures/cake_local_deps/.bp-config/options.json

This file was deleted.

7 changes: 0 additions & 7 deletions fixtures/cake_remote_deps/.bp-config/options.json

This file was deleted.

23 changes: 0 additions & 23 deletions fixtures/cake_remote_deps/.editorconfig

This file was deleted.

35 changes: 0 additions & 35 deletions fixtures/cake_remote_deps/.gitattributes

This file was deleted.

52 changes: 0 additions & 52 deletions fixtures/cake_remote_deps/.gitignore

This file was deleted.

12 changes: 0 additions & 12 deletions fixtures/cake_remote_deps/.htaccess

This file was deleted.

53 changes: 0 additions & 53 deletions fixtures/cake_remote_deps/README.md

This file was deleted.

Loading
Loading