Skip to content

Commit

Permalink
Merge pull request #32 from RoyalHaskoningDHV/add_tests_to_github
Browse files Browse the repository at this point in the history
Add tests to GitHub
  • Loading branch information
PierpaoloLucarelli authored Mar 19, 2024
2 parents 072c616 + 7366ab0 commit cb11971
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish Python 🐍 distribution 📦 to PyPI

on:
push:
branches: [master, build/*]
branches: [main, build/*]

jobs:
build:
Expand All @@ -20,7 +20,7 @@ jobs:
run: |
sed -i "/__version__/d" twinn_ml_interface/_version.py
sed -i "s/__dev_version__/__version__/g" twinn_ml_interface/_version.py
if: github.ref != 'refs/heads/master'
if: github.ref != 'refs/heads/main'

- name: Install pypa/build
run: >-
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish Python 🐍 distribution 📦 to TestPyPI

on:
push:
branches: [master, build/*]
branches: [main, build/*]

jobs:
build:
Expand All @@ -20,7 +20,7 @@ jobs:
run: |
sed -i "/__version__/d" twinn_ml_interface/_version.py
sed -i "s/__dev_version__/__version__/g" twinn_ml_interface/_version.py
if: github.ref != 'refs/heads/master'
if: github.ref != 'refs/heads/main'

- name: Install pypa/build
run: >-
Expand Down
30 changes: 7 additions & 23 deletions .github/workflows/validate_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,10 @@ jobs:
- name: 'Run all pre-commit linters'
run: |
pre-commit run --all-files --show-diff-on-failure
# testing: # TODO: Activate when Custom Protocol is public

# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# python-version: ["3.10"]

# steps:
# - uses: actions/checkout@v3
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v3
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install pre-commit
# run: |
# python -m pip install --upgrade pip
# python -m pip install pytest
# pip install .
# - name: Test with pytest
# run: |
# pytest tests/
- name: Prepare for testing
run: |
python -m pip install pytest
pip install .
- name: Test with pytest
run: |
pytest tests/

0 comments on commit cb11971

Please sign in to comment.