Skip to content

Commit

Permalink
Merge pull request #233 from JanEricNitschke/more_ci
Browse files Browse the repository at this point in the history
Adding more CI configurations
  • Loading branch information
pnxenopoulos authored May 18, 2023
2 parents 7f54b04 + edf1520 commit 5df6c49
Show file tree
Hide file tree
Showing 22 changed files with 1,837 additions and 1,145 deletions.
33 changes: 26 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,51 @@ on:

jobs:
build:
runs-on: ubuntu-latest

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 csgo library
uses: actions/checkout@v3
- 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: '3.11'
- name: Checkout csgo library
uses: actions/checkout@v3
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
requirements.txt
tests/requirements.txt
- name: Installation
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f tests/requirements.txt ]; then pip install -r tests/requirements.txt; fi
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.267
- name: Typecheck with pyright
uses: jakebailey/pyright-action@v1
with:
version: 1.1.307
- 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
Expand Down
91 changes: 53 additions & 38 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,40 +1,55 @@
---
exclude: docs/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
language: python
- id: check-json
language: python
- id: end-of-file-fixer
language: python
- id: trailing-whitespace
language: python
- id: check-docstring-first
language: python
- id: requirements-txt-fixer
language: python
- id: check-merge-conflict
language: python
- id: check-toml
language: python
- id: check-xml
language: python
- id: check-ast
language: python
- id: check-builtin-literals
language: python
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.262
hooks:
- id: ruff
args:
- --fix
- --exit-non-zero-on-fix
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
language: python
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v4.4.0
hooks:
- id: check-yaml
language: python
- id: check-json
language: python
- id: end-of-file-fixer
language: python
- id: trailing-whitespace
language: python
- id: check-docstring-first
language: python
- id: requirements-txt-fixer
language: python
- id: check-merge-conflict
language: python
- id: check-toml
language: python
- id: check-xml
language: python
- id: check-ast
language: python
- id: check-builtin-literals
language: python
- repo: 'https://github.com/charliermarsh/ruff-pre-commit'
rev: v0.0.267
hooks:
- id: ruff
args:
- '--fix'
- '--exit-non-zero-on-fix'
- repo: 'https://github.com/psf/black'
rev: 23.3.0
hooks:
- id: black
language: python
# - repo: 'https://github.com/RobertCraigie/pyright-python'
# rev: v1.1.305
# hooks:
# - id: pyright
# additional_dependencies:
# - imageio>=2.9.0
# - matplotlib>=3.1.2
# - networkx>=2.6.3
# - numpy>=1.18.1
# - pandas>=0.25.3
# - scipy>=1.7.3
# - Shapely>=1.8.2
# - sympy>=1.10.1
# - textdistance>=4.2.0
# - tqdm>=4.55.2
# - pandas-stubs==2.0.0.230412
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Discord](https://img.shields.io/discord/868146581419999232?color=blue&label=Discord&logo=discord)](https://discord.gg/W34XjsSs2H) [![Downloads](https://static.pepy.tech/personalized-badge/awpy?period=total&units=international_system&left_color=grey&right_color=blue&left_text=Downloads)](https://pepy.tech/project/awpy) [![Build](https://github.com/pnxenopoulos/awpy/actions/workflows/build.yml/badge.svg)](https://github.com/pnxenopoulos/awpy/actions/workflows/build.yml) [![Documentation Status](https://readthedocs.org/projects/awpy/badge/?version=latest)](https://awpy.readthedocs.io/en/latest/?badge=latest) [![Docs](https://img.shields.io/badge/docs-Documentation-informational)](https://awpy.readthedocs.io/en/latest/) [![GitHub issues](https://img.shields.io/github/issues/pnxenopoulos/awpy)](https://github.com/pnxenopoulos/awpy/issues) [![MIT Licence](https://img.shields.io/badge/license-MIT-lightgrey)](https://github.com/pnxenopoulos/awpy/blob/main/LICENSE)
[![Discord](https://img.shields.io/discord/868146581419999232?color=blue&label=Discord&logo=discord)](https://discord.gg/W34XjsSs2H) [![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-311/) [![Downloads](https://static.pepy.tech/personalized-badge/awpy?period=total&units=international_system&left_color=grey&right_color=blue&left_text=Downloads)](https://pepy.tech/project/awpy) [![Build](https://github.com/pnxenopoulos/awpy/actions/workflows/build.yml/badge.svg)](https://github.com/pnxenopoulos/awpy/actions/workflows/build.yml) [![Documentation Status](https://readthedocs.org/projects/awpy/badge/?version=latest)](https://awpy.readthedocs.io/en/latest/?badge=latest) [![Docs](https://img.shields.io/badge/docs-Documentation-informational)](https://awpy.readthedocs.io/en/latest/) [![GitHub issues](https://img.shields.io/github/issues/pnxenopoulos/awpy)](https://github.com/pnxenopoulos/awpy/issues) [![MIT Licence](https://img.shields.io/badge/license-MIT-lightgrey)](https://github.com/pnxenopoulos/awpy/blob/main/LICENSE) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit) [![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff) [![Checked with pyright](https://microsoft.github.io/pyright/img/pyright_badge.svg)](https://microsoft.github.io/pyright/)


# awpy
Expand Down
Loading

0 comments on commit 5df6c49

Please sign in to comment.