winci63 #84
This file contains hidden or 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: Python CI | |
| on: | |
| push: | |
| branches: [main, devel] | |
| pull_request: | |
| jobs: | |
| Linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest pytest-cov toml | |
| pip install -e . | |
| - name: Run tests | |
| run: sh tests/run_tests_with_coverage.sh | |
| - name: Verify version sync | |
| run: | | |
| python -c "from runce import __version__; print(__version__)" > actual_version | |
| python -c "import toml; print(toml.load('pyproject.toml')['project'].get('version', 'DYNAMIC'))" > pyproject_version | |
| if [ $(cat pyproject_version) != "DYNAMIC" ] && [ $(cat pyproject_version) != $(cat actual_version) ]; then | |
| echo "Version mismatch!" | |
| exit 1 | |
| fi | |
| # - name: Upload coverage to Codecov | |
| # uses: codecov/codecov-action@v3 | |
| Windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest pytest-cov toml | |
| pip install -e . | |
| - name: Prep tests | |
| env: | |
| TARGET: runce | |
| run: python tests/remove_emojis.py | |
| - name: Run tests/test_windows.py | |
| run: python tests/test_windows.py | |
| continue-on-error: true | |
| - name: Run tests/test_utils.py | |
| run: python tests/test_utils.py | |
| continue-on-error: true | |
| - name: Run tests/test_cli.py | |
| run: python tests/test_cli.py | |
| continue-on-error: true | |
| # - name: Run tests | |
| # run: python -m pytest -s |