CI debugging #47
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
| name: Ruby | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| ruby-version: ['2.7', '3.0', '3.1', '3.4'] | |
| steps: | |
| - run: | | |
| sudo apt-get update | |
| sudo apt install -y libarchive-tools lintian cpanminus | |
| - uses: actions/checkout@v3 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
| - run: | | |
| # Run the test-suite | |
| # NHUBBARD 20251104: we have to use a Python virtual environment because | |
| # it is required by newer versions of the `pip` Python package installer; | |
| # install `pipreqs` and use it to automatically find and install missing | |
| # Python dependencies, which is important because the "packaging" package | |
| # was missing from 'parse_requires.py', and by using `pipreqs` we can | |
| # automatically avoid future breakages if new Python dependencies are | |
| # introduced | |
| python -m venv venv | |
| . venv/bin/activate | |
| pip install pipreqs && pipreqs . && pip install -r requirements.txt | |
| echo PATH = $PATH | |
| if [ ! -z "$RUNNER_DEBUG" ] ; then | |
| DEBUG=1 bundle exec rspec -fd | |
| else | |
| bundle exec rspec | |
| fi | |
| env: | |
| SHELL: /usr/bin/bash | |
| - name: Setup tmate session on failure | |
| if: failure() | |
| uses: mxschmitt/action-tmate@v3 | |
| with: | |
| limit-access-to-actor: true |