diff --git a/.github/workflows/ci-cloud.yml b/.github/workflows/ci-cloud.yml new file mode 100644 index 0000000..63b1107 --- /dev/null +++ b/.github/workflows/ci-cloud.yml @@ -0,0 +1,45 @@ +name: Cloud integration + +# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows +on: [push, workflow_dispatch] + + +defaults: + run: + shell: bash + +jobs: + pytester: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ["ubuntu-22.04", "macOS-13", "windows-2022"] + python-version: ["3.10"] + + # Timeout: https://stackoverflow.com/a/59076067/4521646 + timeout-minutes: 35 + env: + TORCH_URL: "https://download.pytorch.org/whl/cpu/torch_stable.html" + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: "pip" + + - name: Install package & dependencies + run: | + pip --version + pip install -e '.[test,extra]' -U -q --find-links $TORCH_URL + pip list + + - name: Test integrations + env: + LIGHTNING_USER_ID: ${{ secrets.LIGHTNING_USER_ID }} + LIGHTNING_API_KEY: ${{ secrets.LIGHTNING_API_KEY }} + run: | + coverage run --source litmodels -m pytest src tests -v -m cloud + timeout-minutes: 5 diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index c5973c9..3924ba2 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -3,7 +3,7 @@ name: CI testing # see: https://help.github.com/en/actions/reference/events-that-trigger-workflows on: # Trigger the workflow on push or pull request, but only for the main branch push: {} - pull_request_target: + pull_request: branches: [main] defaults: @@ -51,14 +51,6 @@ jobs: run: | coverage run --source litmodels -m pytest src tests -v -m "not cloud" - - name: Test integrations - env: - LIGHTNING_USER_ID: ${{ secrets.LIGHTNING_USER_ID }} - LIGHTNING_API_KEY: ${{ secrets.LIGHTNING_API_KEY }} - run: | - coverage run --source litmodels -m pytest src tests -v -m cloud - timeout-minutes: 5 - - name: Statistics run: | coverage report