Skip to content

Propagate map control types throughout awp #651

Propagate map control types throughout awp

Propagate map control types throughout awp #651

Workflow file for this run

# This workflow will run the tests for the awpy Python library
name: build
on:
push:
branches: [main, dev]
pull_request:
branches: [main]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11"] #, "3.12-dev"]
go-version: ["1.18", "1.19", "1.20"]
steps:
- name: Checkout awpy library
uses: actions/checkout@v3
- name: Cache test demos
id: cache-demos
uses: actions/cache@v3
env:
cache-name: cache-demos
with:
# demos are downloaded to
# and looked for in `{repo}/tests`
path: ${{ github.workspace }}/tests/*.dem
# Invalidate the cache if the file containing the demo urls
# has changed.
key: cache-test-demos-${{ hashFiles('**/test_data.json') }}
# Care with this: If a demo changes but the name remains the same
# then this could cause issues.
# So do not do that!
restore-keys: cache-test-demos-
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: awpy/parser/go.sum
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: |
requirements.txt
tests/requirements.txt
- name: Installation
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r tests/requirements.txt
- name: Check formatting with black
uses: psf/black@stable
- name: Lint with ruff
uses: chartboost/ruff-action@v1
with:
version: 0.0.277
- name: Typecheck with pyright
uses: jakebailey/pyright-action@v1
with:
version: 1.1.316
- name: Thorough check with pylint
run: pylint awpy
- name: Test with pytest
run: |
coverage run -m pytest --durations=10
coverage report -m
coverage json
coverage html
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: htmlcov/