Skip to content

Update version 0.3

Update version 0.3 #30

Workflow file for this run

name: workflow
on:
pull_request_target:
branches:
- main
jobs:
validate_classes:
name: validate classes
runs-on: ubuntu-latest
steps:
- name: checkout tsnkit
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: validate classes
run: |
pip install -q -r requirements.txt
pip install -q seaborn
python -m tsnkit.test.debug._validate_classes
validate_io:
name: validate io
runs-on: ubuntu-latest
steps:
- name: checkout tsnkit
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: validate classes
run: |
pip install -q -r requirements.txt
pip install -q seaborn
python -m tsnkit.test.debug._validate_io
validate_sim:
name: validate simulator
runs-on: ubuntu-latest
steps:
- name: checkout tsnkit
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: validate classes
run: |
pip install -q -r requirements.txt
pip install -q seaborn
python -m tsnkit.test.debug._validate_simulator
validate_algorithms:
name: validate algorithms
runs-on: ubuntu-latest
container:
image: ghcr.io/elainehu222/cpoptimizer:latest
credentials:
username: elainehu222
password: ${{secrets.GHCR_TOKEN}}
steps:
- name: checkout tsnkit
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: get changed algorithms
id: changes
env:
PR: ${{github.event.pull_request.head.sha}}
MAIN: ${{github.event.pull_request.base.sha}}
run: |
pip install -q -r requirements.txt
git config --global --add safe.directory "$GITHUB_WORKSPACE"
changes=$(git diff --name-only "$PR" "$MAIN")
changed_models=$(echo "$changes" | grep '^tsnkit/algorithms/.*\.py$' | xargs -n1 basename | sed 's/\.py$//' | tr '\n' ' ')
echo "models=$changed_models" >> "$GITHUB_OUTPUT"
echo "$changed_models"
- name: run test
run: |
python -m tsnkit.test.debug ${{steps.changes.outputs.models}} jrs_nw ls smt_wa --subset