Use ustr serde implementation (#1192) #1108
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
name: coverage | |
# Run code coverage analysis for NautilusTrader | |
on: | |
push: | |
branches: [develop] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x64] | |
os: [ubuntu-latest] | |
python-version: ["3.10"] | |
name: build - Python ${{ matrix.python-version }} (${{ matrix.arch }} ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Rust tool-chain (stable) | |
uses: actions-rust-lang/[email protected] | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
- name: Set up Python environment | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install build dependencies | |
run: python -m pip install --upgrade pip setuptools wheel pre-commit poetry==1.5.1 msgspec | |
- name: Setup cached pre-commit | |
id: cached-pre-commit | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit | |
key: ${{ runner.os }}-${{ matrix.python-version }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Run pre-commit | |
run: pre-commit run --all-files | |
- name: Set poetry output | |
run: echo "dir=$(poetry config cache-dir)" >> $GITHUB_ENV | |
- name: Poetry cache | |
id: cached-poetry | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.dir }} | |
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('**/poetry.lock') }} | |
- name: Install Redis | |
run: | | |
sudo apt-get install redis-server | |
redis-server --daemonize yes | |
- name: Run tests with coverage | |
run: make pytest-coverage | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.xml | |
verbose: true |