Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT: Trying stuff out for shared library for go code. #234

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
26 changes: 19 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,34 @@ 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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
if: github.event_name != 'pull_request'
- name: Trigger RTDs build
uses: dfm/rtds-action@v1
with:
Expand Down
98 changes: 98 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
linters:
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- contextcheck
# - cyclop
- decorder
- depguard
- dogsled
# - dupl # Probably useful in principle. But did not find an easy way.
- dupword
- durationcheck
- errcheck
- errchkjson
- errname
- errorlint
- execinquery
- exhaustive
# - exhaustruct # Should be useful in the future. No time now
- exportloopref
- forbidigo
- forcetypeassert
# - funlen # Should be usefull in the future. No time atm
# - gci # Broken for me
- ginkgolinter
- gocheckcompilerdirectives
- gochecknoglobals
- gochecknoinits
# - gocognit # Similar to cyclop. Could be usefull
- goconst
- gocritic
# - gocyclo
- godot
- godox
- goerr113
# - gofmt
# - gofumpt
- goheader
# - goimports
# - gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- gosimple
- govet
- grouper
- importas
- ineffassign
- interfacebloat
- ireturn
- lll
- loggercheck
- maintidx
- makezero
- misspell
- musttag
- nakedret
# - nestif
- nilerr
- nilnil
- nlreturn
- noctx
- nolintlint
- nonamedreturns
- nosprintfhostport
- paralleltest
- prealloc
- predeclared
- promlinter
- reassign
- revive
- staticcheck
- stylecheck
# - tagliatelle
- tenv
- testableexamples
- testpackage
- thelper
- tparallel
- typecheck
- unconvert
- unparam
- unused
- usestdlibvars
# - varnamelen # Usefull for the future
- whitespace
- wrapcheck
# - wsl
linters-settings:
maintidx:
# Show functions with maintainability index lower than N.
# A high index indicates better maintainability (it's kind of the opposite of complexity).
# Default: 20
under: 10
Empty file added awpy/parser/awpygo/__init__.py
Empty file.
Loading