tests.yml
This file
Path
.github/workflows/tests.yml
93 lines · 2.5 KiB · YAML
Last changed by
[actions] retry apt package installs through Ubuntu mirror outagesJordan Harbandbefore adoption50e73c4
History of this fileTake it
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394name: urchin tests
on: [push, pull_request]
permissions: contents: read
jobs: tests: permissions: contents: read # for actions/checkout@v6
name: "tests" runs-on: ubuntu-latest timeout-minutes: 30 defaults: run: shell: 'script -q -e -c "${{ matrix.shell }} {0}"'
strategy: fail-fast: false matrix: exclude: - shell: sh suite: install_script - shell: dash suite: install_script - shell: zsh suite: install_script - shell: ksh suite: install_script suite: - install_script - sourcing - slow - installation_iojs 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 - uses: actions/checkout@v6 - run: sh .github/scripts/apt-install.sh ${{ matrix.shell }} if: matrix.shell == 'zsh' || matrix.shell == 'ksh' # zsh (https://github.com/actions/runner-images/issues/264) and ksh are not in the ubuntu image shell: bash - run: sudo ${{ matrix.shell }} --version 2> /dev/null || dpkg -s ${{ matrix.shell }} 2> /dev/null || which ${{ matrix.shell }} - run: curl --version - run: wget --version - 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 - run: env - name: Run tests shell: bash run: | for attempt in 1 2 3; do timeout 600 make TERM=xterm-256color TEST_SUITE="${{ matrix.suite }}" SHELL="${{ matrix.shell }}" URCHIN="$(npx which urchin)" test-${{ matrix.shell }} && exit 0 EXIT_CODE=$? if [ $EXIT_CODE -ne 124 ]; then exit $EXIT_CODE fi echo "Attempt ${attempt} timed out; retrying..." done echo "All 3 attempts timed out." exit 1
nvm: permissions: contents: none name: 'all test suites, all shells' needs: [tests] runs-on: ubuntu-latest steps: - run: true