Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Nov 19, 2024
1 parent f6e87d3 commit cd50112
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 12 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/ci-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Test CLI

on:
push:
branches: [main, "release/*"]
pull_request:
branches: [main, "release/*"]

defaults:
run:
shell: bash

jobs:
test-cli:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10"]
timeout-minutes: 10
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python 🐍 ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: install package
run: |
pip install -e '.[cli]'
pip list
- name: run CLI
working-directory: ./scripts
run: |
python -m lightning_utilities.cli version
python -m lightning_utilities.cli --help
scripts-guardian:
runs-on: ubuntu-latest
needs: test-cli
if: always()
steps:
- run: echo "${{ needs.test-cli.result }}"
- name: failing...
if: needs.test-cli.result == 'failure'
run: exit 1
- name: cancelled or skipped...
if: contains(fromJSON('["cancelled", "skipped"]'), needs.test-cli.result)
timeout-minutes: 1
run: sleep 90
16 changes: 4 additions & 12 deletions .github/workflows/ci-scripts.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test scripts / CLI
name: Test scripts

on:
push:
Expand All @@ -16,9 +16,9 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-22.04", "macos-13", "windows-2022"]
python-version: ["3.8", "3.12"]
timeout-minutes: 35
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10"]
timeout-minutes: 15
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
Expand All @@ -41,14 +41,6 @@ jobs:
working-directory: ./scripts
run: pytest . -v

- name: install package
run: pip install -e '.[cli]'
- name: run CLI
working-directory: ./scripts
run: |
python -m lightning_utilities.cli version
python -m lightning_utilities.cli --help
scripts-guardian:
runs-on: ubuntu-latest
needs: test-scripts
Expand Down

0 comments on commit cd50112

Please sign in to comment.