Skip to content

Commit

Permalink
workflows: update package testing to use same approach as builds
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Stephens <[email protected]>
  • Loading branch information
patrick-stephens authored and edsiper committed Jan 18, 2023
1 parent 298da20 commit 784d7be
Showing 1 changed file with 56 additions and 11 deletions.
67 changes: 56 additions & 11 deletions .github/workflows/pr-package-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,69 @@ on:
- opened
- reopened
- synchronize
branches:
- master

jobs:
pr-package-test-build:
name: PR - packages build
pr-package-test-build-generate-matrix:
name: PR - packages build matrix
# This is a long test to run so only on-demand for certain PRs
if: contains(github.event.pull_request.labels.*.name, 'ok-package-test')
needs:
- pr-package-test-build-get-meta
runs-on: ubuntu-latest
outputs:
build-matrix: ${{ steps.set-matrix.outputs.build-matrix }}
environment: pr
permissions:
contents: read
steps:
- name: Checkout code
- name: Checkout repository, always latest for action
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
# Set up the list of target to build so we can pass the JSON to the reusable job
- uses: ./.github/actions/generate-package-build-matrix
id: set-matrix
with:
ref: master

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
pr-package-test-build-packages:
name: PR - packages build Linux
needs:
- pr-package-test-build-get-meta
- pr-package-test-build-generate-matrix
uses: ./.github/workflows/call-build-linux-packages.yaml
with:
version: ${{ needs.pr-package-test-build-get-meta.outputs.branch }}
ref: ${{ needs.pr-package-test-build-get-meta.outputs.branch }}
build_matrix: ${{ needs.pr-package-test-build-generate-matrix.outputs.build-matrix }}
environment: pr
unstable: ${{ needs.pr-package-test-build-get-meta.outputs.date }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Run build of all locally
run: ./local-build-all.sh
shell: bash
working-directory: packaging
pr-package-test-build-windows-package:
name: PR - packages build Windows
needs:
- pr-package-test-build-get-meta
uses: ./.github/workflows/call-build-windows.yaml
with:
version: ${{ needs.pr-package-test-build-get-meta.outputs.branch }}
ref: ${{ needs.pr-package-test-build-get-meta.outputs.branch }}
environment: pr
unstable: ${{ needs.pr-package-test-build-get-meta.outputs.date }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}

pr-package-test-build-macos-package:
name: PR - packages build MacOS
needs:
- pr-package-test-build-get-meta
uses: ./.github/workflows/call-build-macos.yaml
with:
version: ${{ needs.pr-package-test-build-get-meta.outputs.branch }}
ref: ${{ needs.pr-package-test-build-get-meta.outputs.branch }}
environment: pr-package-test
unstable: ${{ needs.pr-package-test-build-get-meta.outputs.date }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 784d7be

Please sign in to comment.