-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove old Score class * Update .gitignore * Fix module filtering in SochaPackageBuilder class * Refactor rust code * Refactor game state * Remove unused imports and fix logging message * Add linters and unittests for Rust and Python * allow clippy lints to game_state.rs and ship.rs * Improve CD and CI workflows * Refactor code formatting and improve readability * Refactor import statements and update dependencies * Update import statement for NetworkSocket * Set PYTHONPATH and fix import in test_network.py * Update CI workflow to use Maturin for building and testing Python code * Fix typo in Maturin command * Update CI workflow to include Python setup and virtual environment creation * Refactor CI workflow to use virtual environment
- Loading branch information
Showing
21 changed files
with
1,156 additions
and
882 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
permissions: read-all | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# Clippy - Rust linter | ||
- name: Install Rust toolchain | ||
run: rustup toolchain install stable | ||
- name: Run Clippy | ||
run: rustup component add clippy && cargo clippy -- -D warnings | ||
|
||
# Install dependencies and run unittests within the virtual environment | ||
- name: Setup and run tests in virtual environment | ||
run: | | ||
python -m venv venv | ||
source venv/bin/activate | ||
pip install ruff | ||
ruff . | ||
pip install maturin | ||
maturin develop | ||
python -m unittest discover -s tests -p '*.py' | ||
# Build and test steps for Rust | ||
- name: Build | ||
run: cargo build --verbose | ||
- name: Run tests | ||
run: cargo test --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.