Make: Upgrade to TinySemVer #51
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: Pre-Release | |
on: | |
push: | |
branches: ["main-dev"] | |
pull_request: | |
branches: ["main-dev"] | |
env: | |
BUILD_TYPE: Release | |
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} | |
PYTHONUTF8: 1 | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
jobs: | |
versioning: | |
name: Update Version | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Run TinySemVer | |
uses: ashvardanian/tinysemver@v2.0.7 | |
with: | |
verbose: "true" | |
version-file: "VERSION" | |
update-version-in: | | |
package.json:"version": "(\d+\.\d+\.\d+)" | |
package-lock.json:"uform",\n\s+"version": "(\d+\.\d+\.\d+)" | |
CITATION.cff:^version: (\d+\.\d+\.\d+) | |
pyproject.toml:^version = "(\d+\.\d+\.\d+)" | |
dry-run: "true" | |
test_python: | |
name: Test Python | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --no-cache-dir --upgrade pip | |
pip install -e ".[onnx]" | |
pip install pytest | |
# When running tests in CI, limit ourselves to the small model tests | |
- name: Test with PyTest | |
run: pytest python/scripts/ -s -x -Wd -v -k small | |
test_javascript: | |
name: Test JavaScript | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
# TODO: JavaScript tests pass, but ONNX throws a memory error on exit | |
# - name: Build JavaScript | |
# run: npm ci | |
# - name: Test JavaScript | |
# run: npm test | |
test_swift: | |
name: Test Swift | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build | |
run: swift build | |
- name: Run tests | |
run: swift test |