Skip to content

Pp 11230/add archive message #3

Pp 11230/add archive message

Pp 11230/add archive message #3

Workflow file for this run

name: Github Actions Tests
on:
workflow_call:
pull_request:
permissions:
contents: read
jobs:
test:
name: Container image tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # 3.5.2
- name: Extract golang build version
id: extract-golang-build-version
run: |
set -euo pipefail
echo "Pulling yq docker image"
docker pull --quiet mikefarah/yq
echo "Done"
echo -n "Detecting circle golang build image used in upstream..."
CIRCLECI_GOLANG_BUILD_IMAGE=$(
docker run \
-v "${PWD}/.circleci/:/circleci" \
mikefarah/yq \
'.jobs.build.docker[] | select(.image | test("^circleci/golang:")) | .image' \
/circleci/config.yml
)
echo "$CIRCLECI_GOLANG_BUILD_IMAGE"
echo -n "Extracting golang version..."
GOLANG_VERSION=$(echo "$CIRCLECI_GOLANG_BUILD_IMAGE" | cut -f 2 -d ":")
echo "$GOLANG_VERSION"
echo "go-version=${GOLANG_VERSION}" >> $GITHUB_OUTPUT
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # 4.0.1
with:
go-version: ${{ steps.extract-golang-build-version.outputs.go-version }}
- name: build-carbon-relay-ng
run: |
set -euo pipefail
go install github.com/go-bindata/go-bindata/...@latest
make build-linux
- name: run-tests
working-directory: ./govuk-tests
run: |
set -euo pipefail
./run-tests.sh