Package CI #668
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: Package CI | |
on: | |
schedule: | |
- cron: "0 0 * * *" # Runs at 00:00 UTC every day | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
operating-system: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
- name: Install package | |
run: | | |
python -m pip install --upgrade pip wheel | |
if [ "${{ matrix.torch }}" == "1.7.0" ]; then | |
pip install ultralyticsplus[tests] torch==1.7.0 torchvision==0.8.1 --extra-index-url https://download.pytorch.org/whl/cpu | |
else | |
pip install ultralyticsplus[tests] --extra-index-url https://download.pytorch.org/whl/cpu | |
fi | |
shell: bash # for Windows compatibility | |
- name: Check environment | |
run: | | |
echo "RUNNER_OS is ${{ runner.os }}" | |
echo "GITHUB_EVENT_NAME is ${{ github.event_name }}" | |
echo "GITHUB_WORKFLOW is ${{ github.workflow }}" | |
echo "GITHUB_ACTOR is ${{ github.actor }}" | |
echo "GITHUB_REPOSITORY is ${{ github.repository }}" | |
echo "GITHUB_REPOSITORY_OWNER is ${{ github.repository_owner }}" | |
python --version | |
pip --version | |
pip list | |
- name: Unittest | |
env: | |
HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
run: | | |
pytest -s |