-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
158 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,3 +76,158 @@ jobs: | |
name: PostgreSQL ${{ matrix.pg }} packages for Ubuntu ${{ matrix.release }} | ||
path: 'build-area/*.deb' | ||
if: failure() | ||
|
||
test-source-upgrade: | ||
name: Test PostgreSQL ${{ matrix.pg }} source upgrade on Ubuntu ${{ matrix.release }} | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
pg: ['11', '12', '13', '14'] | ||
release: [20.04] | ||
steps: | ||
- name: Check out repository | ||
uses: actions/[email protected] | ||
|
||
- name: Build Docker container | ||
run: docker build --build-arg=RELEASE=${{ matrix.release }} --tag=tester . | ||
|
||
- name: Upgrade from source | ||
run: docker run --rm tester ./test/ci/source-upgrade.bash ${{ matrix.pg }} | ||
|
||
test-source-upgrade-using-loader: | ||
name: | ||
Test PostgreSQL ${{ matrix.pg }} package upgrade using loader on Ubuntu ${{ matrix.release }} | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
pg: ['11', '12', '13', '14'] # TODO: '15' | ||
release: [20.04] | ||
steps: | ||
- name: Check out repository | ||
uses: actions/[email protected] | ||
|
||
- name: Build Docker container | ||
run: docker build --build-arg=RELEASE=${{ matrix.release }} --tag=tester . | ||
|
||
- name: Upgrade from latest release | ||
run: docker run --rm tester ./test/ci/source-upgrade-using-loader.bash ${{ matrix.pg }} | ||
|
||
test-source-upgrade-using-loader-without-extension-support: | ||
name: | ||
Test PostgreSQL ${{ matrix.pg }} package upgrade using loader without extension support on | ||
Ubuntu ${{ matrix.release }} | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
pg: ['11', '12', '13', '14'] # TODO: '15' | ||
release: [20.04] | ||
steps: | ||
- name: Check out repository | ||
uses: actions/[email protected] | ||
|
||
- name: Build Docker container | ||
run: docker build --build-arg=RELEASE=${{ matrix.release }} --tag=tester . | ||
|
||
- name: Upgrade from latest release | ||
run: | ||
docker run --rm tester | ||
./test/ci/source-upgrade-using-loader-without-extension-support.bash ${{ matrix.pg }} | ||
|
||
test-package: | ||
name: Test PostgreSQL ${{ matrix.pg }} package install on ${{ matrix.release }} | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
pg: ['11', '12', '13', '14'] # TODO: '15' | ||
release: [20.04] | ||
steps: | ||
- name: Check out repository | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Build package | ||
uses: linz/linz-software-repository@v15 | ||
with: | ||
release: ${{ matrix.release }} | ||
packages: jq | ||
|
||
- name: Build Docker container | ||
run: docker build --build-arg=RELEASE=${{ matrix.release }} --tag=tester . | ||
|
||
- name: Upgrade from latest release | ||
run: | ||
docker run --rm --volume="${PWD}/build-area:/packages" tester | ||
./test/ci/install-local-package.bash ${{ matrix.pg }} | ||
|
||
package: | ||
needs: | ||
- lint | ||
- test-install-from-source | ||
- test-package | ||
- test-package-upgrade | ||
- test-source-upgrade | ||
- test-source-upgrade-using-loader | ||
- test-source-upgrade-using-loader-without-extension-support | ||
name: Package for Ubuntu ${{ matrix.release }} | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
release: [20.04, 22.04] | ||
max-parallel: 1 | ||
steps: | ||
- name: Check out repository | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Determine packagecloud publication target | ||
run: | | ||
# TODO: it would be nice to turn this into a single-liner in | ||
# github-action syntax | ||
echo "GitHub ref: ${{ github.ref }}" | ||
echo "GitHub event_name: ${{ github.event_name }}" | ||
REPO= | ||
if test "${{ github.event_name }}" = 'push'; then | ||
if expr "${{ github.ref }}" : "refs/tags/" > /dev/null; then | ||
REPO=test | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | ||
elif test "${{ github.ref }}" = 'refs/heads/packagecloud' \ | ||
-o "${{ github.ref }}" = 'refs/heads/master' | ||
then | ||
REPO=dev | ||
fi | ||
fi | ||
echo "REPO=$REPO" | tee --append $GITHUB_ENV | ||
- name: Build and release package | ||
uses: linz/linz-software-repository@v15 | ||
with: | ||
release: ${{ matrix.release }} | ||
packages: jq | ||
packagecloud_token: ${{ secrets.LINZCI_PACKAGECLOUD_TOKEN }} | ||
packagecloud_repository: ${{ env.REPO }} | ||
push_to_git_remote: origin | ||
|
||
finalise: | ||
name: Verify all dependencies passed | ||
if: always() | ||
needs: | ||
- lint | ||
- package | ||
- test-install-from-source | ||
- test-package | ||
- test-package-upgrade | ||
- test-source-upgrade | ||
- test-source-upgrade-using-loader | ||
- test-source-upgrade-using-loader-without-extension-support | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Decide whether the needed jobs succeeded or failed | ||
uses: re-actors/[email protected] | ||
with: | ||
jobs: ${{ toJSON(needs) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters