Add pipenv cooldown documentation #60
Workflow file for this run
This file contains hidden or 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
| # Smoke-test cooldowns.sh (Linux + macOS). Logic: tests/smoke-test.sh | |
| # (fed on stdin: bash -s <profile> < tests/smoke-test.sh — same pattern in Docker and on host). | |
| # https://github.com/mprpic/cooldowns/pull/1 | |
| name: Smoke tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| smoke: | |
| strategy: | |
| matrix: | |
| include: | |
| - name: Linux (Debian container) | |
| runs-on: ubuntu-latest | |
| - name: macOS (isolated HOME, zsh) | |
| runs-on: macos-latest | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.runs-on }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| # Pin Node/npm on every runner (npm 11+ avoids `check` WARN for min-release-age). | |
| # Linux smoke runs in Docker (isolated); macOS smoke uses host PATH, so this matters there. | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| - name: Install pnpm (macOS only; Linux installs pnpm inside the Docker container) | |
| if: runner.os == 'macOS' | |
| run: npm install -g pnpm | |
| - name: Smoke test | |
| run: | | |
| set -euo pipefail | |
| script="$GITHUB_WORKSPACE/tests/smoke-test.sh" | |
| if [[ "${{ runner.os }}" == "Linux" ]]; then | |
| docker run --rm -i \ | |
| -v "$GITHUB_WORKSPACE/cooldowns.sh:/usr/local/bin/cooldowns.sh:ro" \ | |
| node:lts-slim \ | |
| bash -c 'npm install -g pnpm --quiet && bash -s /etc/profile.d/cooldowns.sh' < "$script" | |
| else | |
| export PATH="$GITHUB_WORKSPACE:$PATH" | |
| chmod +x "$GITHUB_WORKSPACE/cooldowns.sh" | |
| ( | |
| export HOME=$(mktemp -d) | |
| unset ZDOTDIR | |
| export SHELL=/bin/zsh | |
| unset UV_EXCLUDE_NEWER YARN_NPM_MINIMAL_AGE_GATE COOLDOWN_MINUTES PIP_UPLOADED_PRIOR_TO BUNDLE_COOLDOWN 2>/dev/null || true | |
| trap 'rm -rf "$HOME"' EXIT | |
| bash -s "$HOME/.zshrc" < "$script" | |
| ) | |
| fi |