Skip to content

Commit

Permalink
Merge branch 'development' into texture-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
einarf committed Dec 29, 2023
2 parents 524094e + ad8820f commit 6f9fa7e
Show file tree
Hide file tree
Showing 365 changed files with 13,247 additions and 8,206 deletions.
29 changes: 14 additions & 15 deletions .github/workflows/selfhosted_runner.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Windows self-hosted test
# This is our full unit tests
# Self-hosted, run on an old notebook
name: Unit testing

on:
push:
Expand All @@ -10,35 +12,32 @@ on:
jobs:

build:
name: Self Hosted Testing
name: Unit tests
runs-on: self-hosted

strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9.13', '3.10', '3.11']
architecture: ['x64']

steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}

- name: Install dependencies part 1
run: |
rm -rf .venv
python -m venv .venv
source .venv/bin/activate
python -m pip install -U pip wheel setuptools
python -m pip install pyogg pymunk
- name: Install dependencies part 2
run: |
source .venv/bin/activate
python -m pip install -I -e .[dev]
- name: code-inspection
run: |
source .venv/bin/activate
mypy arcade
ruff arcade
- name: build-docs
run: |
source .venv/bin/activate
sphinx-build doc build -W
python -m pip install -I -e .[testing_libraries]
- name: Test with pytest
run: |
source .venv/bin/activate
Expand All @@ -64,7 +63,7 @@ jobs:
- name: Upload a Build Artifact
if: always() && steps.prepare-artifact.outcome == 'success'
continue-on-error: true
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: pull-request-payload
path: pull_request_payload.json
81 changes: 73 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: GitHub Ubuntu test
# This does code inspection and checks to make sure building of docs works

name: GitHub based tests

on:
push:
Expand All @@ -10,13 +12,13 @@ on:
jobs:

build:
name: test
name: Code inspections
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.11']
architecture: ['x64']

steps:
Expand All @@ -31,16 +33,79 @@ jobs:
run: |
python -m pip install -U pip wheel setuptools
- name: wheel
id: wheel
run: |
python -m pip install -e .[dev]
- name: code-inspection
- name: "code-inspection: mypy"
if: ${{ (success() || failure()) && steps.wheel.outcome == 'success' }}
run: |
python ./make.py mypy
- name: "code-inspection: pyright"
if: ${{ (success() || failure()) && steps.wheel.outcome == 'success' }}
run: |
python ./make.py pyright
- name: "code-inspection: ruff"
if: ${{ (success() || failure()) && steps.wheel.outcome == 'success' }}
run: |
mypy arcade
ruff arcade
python ./make.py ruff
# Prepare the Pull Request Payload artifact. If this fails,
# we fail silently using the `continue-on-error` option. It's
# nice if this succeeds, but if it fails for any reason, it
# does not mean that our lint-test checks failed.
- name: Prepare Pull Request Payload artifact
id: prepare-artifact
if: always() && github.event_name == 'pull_request'
continue-on-error: true
run: cat $GITHUB_EVENT_PATH | jq '.pull_request' > pull_request_payload.json

# This only makes sense if the previous step succeeded. To
# get the original outcome of the previous step before the
# `continue-on-error` conclusion is applied, we use the
# `.outcome` value. This step also fails silently.
- name: Upload a Build Artifact
if: always() && steps.prepare-artifact.outcome == 'success'
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: pull-request-payload
path: pull_request_payload.json

builddoc:

name: Documentation build test
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
# python-version in must be kept in sync with .readthedocs.yaml
#
# Why 3.9?
# 1. It's the lowest version compatible w/ Sphinx 7.2.2, a doc build dependency
# 2. Better doc build accessibility for contributors who may have trouble
# setting up newer Python versions (Debian, etc).
python-version: ['3.9']
architecture: ['x64']

steps:
- uses: actions/checkout@v3
- name: setup
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}

- name: dependencies
run: |
python -m pip install -U pip wheel setuptools
- name: wheel
id: wheel
run: |
python -m pip install -e .[dev]
- name: build-docs
run: |
sphinx-build doc build -W
# Prepare the Pull Request Payload artifact. If this fails, we
# Prepare the Pull Request Payload artifact. If this fails,
# we fail silently using the `continue-on-error` option. It's
# nice if this succeeds, but if it fails for any reason, it
# does not mean that our lint-test checks failed.
Expand All @@ -57,7 +122,7 @@ jobs:
- name: Upload a Build Artifact
if: always() && steps.prepare-artifact.outcome == 'success'
continue-on-error: true
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: pull-request-payload
path: pull_request_payload.json
31 changes: 31 additions & 0 deletions .github/workflows/verify_types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Type completeness report

on:
push:
branches: [development, maintenance]
pull_request:
branches: [development, maintenance]
workflow_dispatch:

jobs:

verifytypes:
name: Verify types
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: setup
uses: actions/setup-python@v4
with:
python-version: 3.11
architecture: x64

- name: Install
id: install
run: |
python -m pip install .[dev]
- name: "code-inspection: pyright --verifytypes"
# Suppress exit code because we do not expect to reach 100% type completeness any time soon
run: |
python -m pyright --verifytypes arcade || true
15 changes: 13 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,24 @@ version: 2
sphinx:
configuration: doc/conf.py

build:
os: ubuntu-22.04
tools:
# If you change this, you also need to update .github/workflows/test.yml
# to make sure doc test builds run on the same version.
#
# Why 3.9?
# 1. It's the lowest version compatible w/ Sphinx 7.2.2, a doc build dependency
# 2. Better doc build accessibility for contributors who may have trouble
# setting up newer Python versions (Debian, etc).
python: "3.9"

python:
version: 3.8
install:
- method: pip
path: .
extra_requirements:
- docs
- dev

# Build PDF & ePub
formats:
Expand Down
108 changes: 0 additions & 108 deletions CONTRIBUTING.md

This file was deleted.

Loading

0 comments on commit 6f9fa7e

Please sign in to comment.