diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7f1854f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,64 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + +permissions: + contents: read + +jobs: + lint: + runs-on: ubuntu-latest + timeout-minutes: 5 + strategy: + matrix: + directory: + - openai-agents-sdk + defaults: + run: + working-directory: ${{ matrix.directory }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Set up Python + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 + with: + python-version: "3.15" + - name: Install dependencies + run: | + pip install -U pip + pip install -r requirements.txt + - name: Lint and check formatting + run: | + ruff check . + ruff format --check . + test: + runs-on: ubuntu-latest + timeout-minutes: 5 + strategy: + matrix: + directory: + - openai-agents-sdk + defaults: + run: + working-directory: ${{ matrix.directory }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: Set up Python + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 + with: + python-version: "3.15" + - name: Install dependencies + run: | + pip install -U pip + pip install -r requirements.txt + pip install ".[test]" + - name: Run all tests + run: | + pytest diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml deleted file mode 100644 index 39d0f43..0000000 --- a/.github/workflows/ruff.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Linting and formatting validation using ruff - -on: - push: - branches: [main] - pull_request: - -permissions: - contents: read - -jobs: - lint: - runs-on: ubuntu-latest - timeout-minutes: 5 - strategy: - matrix: - directory: - - openai-agents-sdk - defaults: - run: - working-directory: ${{ matrix.directory }} - - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - name: Set up Python - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 - with: - python-version: "3.14" - - name: Install dependencies - run: | - pip install -U pip - pip install -r requirements.txt - - name: Lint and check formatting with ruff - run: | - ruff check . - ruff format --check . diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 6e5ea1d..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Run all the unit tests - -on: - push: - branches: [main] - pull_request: - -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 5 - strategy: - matrix: - directory: - - openai-agents-sdk - defaults: - run: - working-directory: ${{ matrix.directory }} - - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - name: Set up Python - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 - with: - python-version: "3.14" - - name: Install dependencies - run: | - pip install -U pip - pip install -r requirements.txt - pip install ".[test]" - - name: Run all tests - run: | - pytest