Skip to content

Pin GitHub Actions to full-length commit SHAs #59

Pin GitHub Actions to full-length commit SHAs

Pin GitHub Actions to full-length commit SHAs #59

Workflow file for this run

name: "Run tests and coverage"
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest-large, macos-latest]
python: ['3.10', '3.12']
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
- name: Use Python ${{ matrix.python }}
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ matrix.python }}
- name: Install dependencies (Linux)
run: sudo apt update && sudo apt install -y --no-install-recommends graphviz
if: startsWith(matrix.os, 'ubuntu')
- name: Install dependencies (MacOS)
run: brew install graphviz
if: startsWith(matrix.os, 'macos')
- name: Install TextWorld from source
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Run tests
run: |
pytest -n 16 -sv --cov=textworld --cov-report=term-missing --cov-fail-under=85 tests/ textworld/