mirror of
https://github.com/actions/runner-images.git
synced 2025-12-11 11:37:00 +00:00
[Ubuntu] Create symlink for Pester test running (#2349)
* Create symlink for test running * Fix 1604 and 2004 templates * Fix php and haskell running * Minor fix * Fix new added tests * Fix symlink * Minor fix * Fix script permissions * Minor fix * Fix firefox and rust tests * Fix new merged tests
This commit is contained in:
committed by
GitHub
parent
81909fddd5
commit
0ae118c6ae
@@ -4,10 +4,5 @@
|
||||
## Desc: Helper function for invoking tests
|
||||
################################################################################
|
||||
|
||||
invoke_tests() {
|
||||
local TEST_FILE="$1"
|
||||
local TEST_NAME="$2"
|
||||
|
||||
pwsh -Command "Import-Module '$HELPER_SCRIPTS/Tests.Helpers.psm1' -DisableNameChecking
|
||||
Invoke-PesterTests -TestFile \"$TEST_FILE\" -TestName \"$TEST_NAME\""
|
||||
}
|
||||
pwsh -Command "Import-Module '$HELPER_SCRIPTS/Tests.Helpers.psm1' -DisableNameChecking
|
||||
Invoke-PesterTests -TestFile \"$1\" -TestName \"$2\""
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs 7-zip
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install 7-Zip
|
||||
apt-get update -y
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs Alibaba Cloud CLI
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install Alibaba Cloud CLI
|
||||
URL=$(curl -s https://api.github.com/repos/aliyun/aliyun-cli/releases/latest | jq -r '.assets[].browser_download_url | select(contains("aliyun-cli-linux"))')
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
function filter_components_by_version {
|
||||
minimumVersion=$1
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# ppa:ansible/ansible doesn't contain packages for Ubuntu20.04
|
||||
if isUbuntu16 || isUbuntu18 ; then
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
## Requires Python >=3.6, must be run as non-root user after toolset installation
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Download latest aws sam cli sources
|
||||
TarballUrl=$(curl -s https://api.github.com/repos/aws/aws-sam-cli/releases/latest | jq -r '.tarball_url')
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install the AWS CLI v1 on Ubuntu16 and Ubuntu18, and AWS CLI v2 on Ubuntu20
|
||||
if isUbuntu20 ; then
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs AzCopy
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install AzCopy7
|
||||
wget -O azcopy.tar.gz https://aka.ms/downloadazcopylinux64
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installed Azure CLI (az)
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install Azure CLI (instructions taken from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)
|
||||
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installed Azure DevOps CLI (az devops)
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# AZURE_EXTENSION_DIR shell variable defines where modules are installed
|
||||
# https://docs.microsoft.com/en-us/cli/azure/azure-cli-extensions-overview
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs Bazel and Bazelisk (A user-friendly launcher for Bazel)
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install bazel
|
||||
curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
function InstallClang {
|
||||
local version=$1
|
||||
|
||||
@@ -28,3 +28,6 @@ after=$(df / -Pm | awk 'NR==2{print $4}')
|
||||
echo "Before: $before MB"
|
||||
echo "After : $after MB"
|
||||
echo "Delta : $(($after-$before)) MB"
|
||||
|
||||
# delete symlink for tests running
|
||||
rm -f /usr/local/bin/invoke_tests
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs CMake
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Test to see if the software in question is already installed, if not install it
|
||||
echo "Checking to see if the installer script has already been run"
|
||||
|
||||
@@ -25,3 +25,7 @@ chmod -R 777 $AGENT_TOOLSDIRECTORY
|
||||
# https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html
|
||||
# https://www.suse.com/support/kb/doc/?id=000016692
|
||||
echo 'vm.max_map_count=262144' | tee -a /etc/sysctl.conf
|
||||
|
||||
# Create symlink for tests running
|
||||
chmod +x $HELPER_SCRIPTS/invoke-tests.sh
|
||||
ln -s $HELPER_SCRIPTS/invoke-tests.sh /usr/local/bin/invoke_tests
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs Docker Compose
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install latest docker-compose from releases
|
||||
URL=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.assets[].browser_download_url | select(contains("docker-compose-Linux-x86_64"))' | head -1)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Check to see if docker is already installed
|
||||
docker_package=moby
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs erlang
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
source_list=/etc/apt/sources.list.d/eslerlang.list
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
## Desc: Installs Firefox
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install Firefox
|
||||
apt-get install -y firefox
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
function InstallGcc {
|
||||
version=$1
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
function InstallFortran {
|
||||
version=$1
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
## Install git
|
||||
add-apt-repository ppa:git-core/ppa -y
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
## Must be run as non-root user after homebrew
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install GitHub CLI
|
||||
url=$(curl -s https://api.github.com/repos/cli/cli/releases/latest | jq -r '.assets[].browser_download_url|select(contains("linux") and contains("amd64") and contains(".deb"))')
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs google-chrome and chromedriver
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
LSB_RELEASE=$(lsb_release -rs)
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs the Google Cloud SDK
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install the Google Cloud SDK
|
||||
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/etc-environment.sh
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install Herbert V. Riedel's PPA for managing multiple version of ghc on ubuntu.
|
||||
# https://launchpad.net/~hvr/+archive/ubuntu/ghc
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs Heroku CLI
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install Heroku CLI
|
||||
curl https://cli-assets.heroku.com/install-ubuntu.sh | sh
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs hhvm
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xB4112585D386EB94
|
||||
add-apt-repository https://dl.hhvm.com/ubuntu
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
# Source the helpers
|
||||
source $HELPER_SCRIPTS/etc-environment.sh
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install the Homebrew on Linux
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs Julia, and adds Julia to the path
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# This function fetches the latest Julia release from the GitHub API
|
||||
# Based on https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs kubectl, helm, kustomize
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install KIND
|
||||
URL=$(curl -s https://api.github.com/repos/kubernetes-sigs/kind/releases/latest | jq -r '.assets[].browser_download_url | select(contains("kind-linux-amd64"))')
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs Leiningen
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
LEIN_BIN=/usr/local/bin/lein
|
||||
curl -s https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein > $LEIN_BIN
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs Mercurial
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs miniconda
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install Miniconda
|
||||
curl -sL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh \
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs Mono
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
LSB_CODENAME=$(lsb_release -cs)
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Install MS SQL Server client tools (https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools?view=sql-server-2017)
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
export ACCEPT_EULA=Y
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs the Netlify CLI
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install the Netlify CLI
|
||||
npm i -g netlify-cli
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install the oc CLI
|
||||
DOWNLOAD_URL="https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Determine latest ORAS CLI version
|
||||
ORAS_CLI_LATEST_VERSION_URL=https://api.github.com/repos/deislabs/oras/releases/latest
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs packer
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install Packer
|
||||
PACKER_VERSION=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | jq -r .current_version)
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs PhantomJS
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install PhantomJS
|
||||
apt-get install -y chrpath libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/etc-environment.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# add repository
|
||||
apt-add-repository ppa:ondrej/php -y
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Install tools via pipx
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
export PATH="$PATH:/opt/pipx_bin"
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs Pollinate
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install Pollinate
|
||||
apt-get install -y --no-install-recommends pollinate
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install Pulumi
|
||||
VERSION=$(curl --fail --silent -L "https://www.pulumi.com/latest-version")
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# install R
|
||||
osLabel=$(getOSVersionLabel)
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Install random number generator
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install haveged
|
||||
apt-get -y install haveged
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/etc-environment.sh
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
export RUSTUP_HOME=/usr/share/rust/.rustup
|
||||
export CARGO_HOME=/usr/share/rust/.cargo
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs sbt
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install sbt
|
||||
# https://www.scala-sbt.org/1.x/docs/Installing-sbt-on-Linux.html
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs selenium server
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Determine latest selenium standalone server version
|
||||
SELENIUM_LATEST_VERSION_URL=https://api.github.com/repos/SeleniumHQ/selenium/releases/latest
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs Sphinx
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install Sphinx
|
||||
apt-get install -y sphinxsearch
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs Subversion client
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install Subversion
|
||||
apt-get install -y --no-install-recommends subversion
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs Swift
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install
|
||||
image_label="$(lsb_release -rs)"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install Swig
|
||||
sudo apt-get install -y swig
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs terraform
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install Terraform
|
||||
TERRAFORM_VERSION=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r .current_version)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Set env variable for vcpkg
|
||||
VCPKG_INSTALLATION_ROOT=/usr/local/share/vcpkg
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs the Vercel CLI
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/invoke-tests.sh
|
||||
|
||||
# Install the Vercel CLI
|
||||
npm i -g vercel
|
||||
|
||||
@@ -132,7 +132,8 @@
|
||||
],
|
||||
"environment_vars": [
|
||||
"IMAGE_VERSION={{user `image_version`}}",
|
||||
"IMAGE_OS={{user `image_os`}}"
|
||||
"IMAGE_OS={{user `image_os`}}",
|
||||
"HELPER_SCRIPTS={{user `helper_script_folder`}}"
|
||||
],
|
||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
},
|
||||
|
||||
@@ -135,7 +135,8 @@
|
||||
],
|
||||
"environment_vars": [
|
||||
"IMAGE_VERSION={{user `image_version`}}",
|
||||
"IMAGE_OS={{user `image_os`}}"
|
||||
"IMAGE_OS={{user `image_os`}}",
|
||||
"HELPER_SCRIPTS={{user `helper_script_folder`}}"
|
||||
],
|
||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
},
|
||||
|
||||
@@ -135,7 +135,8 @@
|
||||
],
|
||||
"environment_vars": [
|
||||
"IMAGE_VERSION={{user `image_version`}}",
|
||||
"IMAGE_OS={{user `image_os`}}"
|
||||
"IMAGE_OS={{user `image_os`}}",
|
||||
"HELPER_SCRIPTS={{user `helper_script_folder`}}"
|
||||
],
|
||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user