Skip to content

Commit

Permalink
init opensimplex-go python-wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
superstes committed Jan 13, 2025
1 parent 4dd9ed6 commit db6cd2e
Show file tree
Hide file tree
Showing 16 changed files with 1,033 additions and 670 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---

name: Lint

on:
push:
branches: [latest]
paths:
- '**.py'
- '**.go'
- '.github/workflows/lint.yml'
- 'requirements_lint.txt'
pull_request:
branches: [latest]
paths:
- '**.py'
- '**.go'
- '.github/workflows/lint.yml'
- 'requirements_lint.txt'

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 2
defaults:
run:
shell: bash

steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}

- name: Install python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install dependencies
run: pip install -r requirements_lint.txt >/dev/null

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Running PyLint
run: |
pylint --version
pylint --recursive=y .
- name: Running GoLang Lint
uses: golangci/golangci-lint-action@v3
with:
args: '--config=.golangci.yml --out-format=colored-line-number'
54 changes: 54 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---

name: Test

on:
push:
branches: [latest]
paths:
- '**.py'
- '**.go'
- '.github/workflows/test.yml'
- 'requirements_test.txt'
pull_request:
branches: [latest]
paths:
- '**.py'
- '**.go'
- '.github/workflows/test.yml'
- 'requirements_test.txt'

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 3
defaults:
run:
shell: bash

steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}

- name: Install python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install dependencies
run: pip install -r requirements_lint.txt >/dev/null

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Building C-library
run: bash build.sh

- name: Running Unit Tests
run: |
pytest --version
python3 -m pytest
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
noise.h
noise.so
10 changes: 10 additions & 0 deletions .golanci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---

run:
go: '1.23.4'
skip-dirs: []
skip-files: []

issues:
exclude: []
exclude-rules: []
Loading

0 comments on commit db6cd2e

Please sign in to comment.