Skip to content

Merge GH Actions workflows that run tests into a single workflow #1

Merge GH Actions workflows that run tests into a single workflow

Merge GH Actions workflows that run tests into a single workflow #1

Workflow file for this run

name: tests
on:
pull_request:
paths:
- 'src/**'
- '.github/workflows/tests.yaml'
- '!src/rez/utils/_version.py'
- '!**.md'
push:
paths:
- 'src/**'
- '.github/workflows/tests.yaml'
- '!src/rez/utils/_version.py'
- '!**.md'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
core:
name: Core tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['macos-11', 'ubuntu-latest', 'windows-2019']
python-version: ['3.7', '3.9', '3.10', '3.11']
include:
- os: macos-11
shells: 'sh,csh,bash,tcsh,zsh,pwsh'
- os: ubuntu-latest
shells: 'sh,csh,bash,tcsh,zsh,pwsh'
- os: windows-2019
shells: 'cmd,pwsh,gitbash'
REZ_SET_PATH_COMMAND: '$env:PATH="$env:PATH;C:\ProgramData\rez\Scripts\rez"'
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install test system dependencies (linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
set -ex
sudo apt-get update
cmake --version
pwsh --version
sudo apt-get install -y csh tcsh zsh
- name: Install rez
run: python ./install.py ./installdir
- name: Install test dependencies
if: ${{ matrix.os != 'windows-2019' }}
run: ./installdir/bin/rez/rez-python -m pip install pytest-cov parameterized
- name: Install test dependencies
if: ${{ matrix.os == 'windows-2019' }}
run: .\installdir\Scripts\rez\rez-python -m pip install pytest-cov parameterized
- name: Run tests
if: ${{ matrix.os != 'windows-2019' }}
run: ./installdir/bin/rez/rez-selftest -v
env:
_REZ_ENSURE_TEST_SHELLS: ${{ matrix.shells }}
- name: Run tests
if: ${{ matrix.os == 'windows-2019' }}
run: .\installdir\Scripts\rez\rez-selftest -v
env:
_REZ_ENSURE_TEST_SHELLS: ${{ matrix.shells }}