chore(main): release 0.20.7 #408
Workflow file for this run
This file contains 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
# Runs several tests when a pull request is created. | |
name: Test | |
on: | |
pull_request: | |
jobs: | |
spell-check: | |
name: runner / misspell | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: reviewdog/action-misspell@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
reporter: github-check | |
level: warning | |
exclude: | | |
./CHANGELOG.md | |
alex: # Checks docs for inconsiderate writing. | |
name: runner / alex | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: reviewdog/action-alex@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
reporter: github-check | |
level: warning | |
markdown-lint: # Lints the markdown code. | |
name: runner / remark-lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check markdown code quality using remark-lint | |
uses: reviewdog/action-remark-lint@v5 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
reporter: github-check | |
level: warning | |
black: # Check python code format. | |
name: runner / black | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: reviewdog/action-black@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
reporter: github-check | |
level: warning | |
flake8: # Lints python code. | |
name: runner / flake8 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python environment | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
cache: "pip" | |
cache-dependency-path: pyproject.toml | |
# NOTE: The following is needed because PyFlyt requires pybullet to be build with numpy. See https://jjshoots.github.io/PyFlyt/documentation.html#installation. | |
- name: Install numpy before pybullet to ensure pybullet is built with numpy. | |
run: | | |
pip install numpy | |
- name: Install the stable_gym package with its dependencies | |
run: | | |
pip install .[dev] | |
- name: flake8 Lint | |
uses: reviewdog/action-flake8@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
reporter: github-check | |
level: warning | |
python-tests: | |
name: python-tests (Testing) | |
runs-on: ubuntu-20.04 # NOTE: Snapshots were created on ubuntu 20.04. | |
strategy: | |
fail-fast: false # Run all matrix jobs. | |
matrix: | |
python-version: [3.8, 3.9, "3.10"] # Supported python versions. | |
steps: | |
- name: Checkout stable-gym repository | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
cache-dependency-path: pyproject.toml | |
- name: Install the stable_gym package with its dependencies | |
run: | | |
pip install .[dev] | |
- name: Test with Pytest | |
run: | | |
set -o pipefail | |
pytest -vv --cache-clear --html=pytest/${{ matrix.python-version }}/html/results.html --junitxml=pytest/${{ matrix.python-version }}/xml/results.xml --cov --cov-report=html:pytest/${{ matrix.python-version }}/cov/pytest-coverage.txt --cov-report=term-missing | tee pytest-coverage.txt | |
set +o pipefail | |
- name: Upload Pytest test results to artifacts | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: pytest-results-${{ matrix.python-version }} | |
path: pytest/ | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |