-
-
Notifications
You must be signed in to change notification settings - Fork 684
45 lines (42 loc) · 1.43 KB
/
ruff.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Ruff
on:
push:
pull_request:
branches: [main]
env:
WORKING_DIRECTORY: "."
RUFF_OUTPUT_FILENAME: "ruff.log"
CUSTOM_FLAGS: ""
CUSTOM_PACKAGES: "instructor examples tests"
jobs:
Ruff:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Environment setup
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: "pip"
- name: Install dev dependencies
run: |
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install -r requirements.txt
python3 -m pip install -r requirements-doc.txt
- name: Run Continuous Integration Action
run: |
set -e -o pipefail
export CUSTOM_PACKAGES="${{ env.CUSTOM_PACKAGES }}" &&
export CUSTOM_FLAGS="${{ env.CUSTOM_FLAGS }}" &&
curl -sSL https://raw.githubusercontent.com/gao-hongnan/omniverse/2fd5de1b8103e955cd5f022ab016b72fa901fa8f/scripts/devops/continuous-integration/lint_ruff.sh -o lint_ruff.sh
chmod +x lint_ruff.sh
bash lint_ruff.sh | tee ${{ env.WORKING_DIRECTORY }}/${{ env.RUFF_OUTPUT_FILENAME }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ruff-log
path: ${{ env.WORKING_DIRECTORY }}/${{ env.RUFF_OUTPUT_FILENAME }}