name: 'Tests: xenial' on: [push, pull_request] permissions: contents: read jobs: xenial: permissions: contents: read name: 'xenial (${{ matrix.shell }})' runs-on: ubuntu-latest strategy: fail-fast: false matrix: shell: - sh - bash - dash - zsh # - ksh steps: - name: Harden Runner uses: step-security/harden-runner@v2 with: allowed-endpoints: github.com:443 registry.npmjs.org:443 raw.githubusercontent.com:443 nodejs.org:443 iojs.org:443 azure.archive.ubuntu.com:80 packages.microsoft.com:443 archive.ubuntu.com:80 security.ubuntu.com:80 production.cloudflare.docker.com:443 registry-1.docker.io:443 auth.docker.io:443 - uses: actions/checkout@v6 with: submodules: true - uses: ljharb/actions/node/install@main name: 'npm install && version checks' with: node-version: 'lts/*' skip-ls-check: true - run: npm ls urchin - run: npx which urchin - name: Run xenial tests in container run: | docker run --rm \ -v "${{ github.workspace }}:/workspace" \ -w /workspace \ -e "SHELL=${{ matrix.shell }}" \ -e "NVM_DIR=/workspace" \ -e "TERM=xterm-256color" \ -e "DEBIAN_FRONTEND=noninteractive" \ ubuntu:16.04 \ bash -c ' set -ex apt-get update apt-get install -y git curl wget make build-essential python zsh libssl-dev if [ "${{ matrix.shell }}" != "sh" ] && [ "${{ matrix.shell }}" != "bash" ]; then apt-get install -y ${{ matrix.shell }} || true fi # Use nvm to install Node.js for running urchin # Node 16 is the last version supporting GLIBC 2.27 (Ubuntu 18.04) export NVM_DIR="/workspace" . /workspace/nvm.sh nvm install 16 nvm use 16 npm ls urchin URCHIN_PATH="$(npx which urchin)" # Now unset nvm stuff for the actual tests nvm deactivate || true nvm unalias default || true unset NVM_CD_FLAGS NVM_BIN NVM_INC export PATH="$(echo "$PATH" | tr ":" "\n" | grep -v "\.nvm" | grep -v "toolcache" | tr "\n" ":")" make TEST_SUITE="xenial" SHELL="${{ matrix.shell }}" URCHIN="$URCHIN_PATH" test-${{ matrix.shell }} ' all: permissions: contents: none name: 'all xenial tests' needs: [xenial] runs-on: ubuntu-latest steps: - run: true