Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

ci(dspy): Add main push test run back (#600)

Isaac Millerfc664d5e339d
diff --git a/.github/workflows/pr_comment.yml b/.github/workflows/pr_comment.yml
deleted file mode 100644
index 87afb5094..000000000
--- a/.github/workflows/pr_comment.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-name: Comment for PR
-
-on:
- workflow_run:
- workflows: ["Check for Ruff Fix, Test, and Build"]
- types:
- - completed
-
-jobs:
- comment:
- runs-on: ubuntu-latest
- steps:
- - name: "Download Ruff Fix Outcome Artifact"
- uses: actions/download-artifact@v2
- with:
- name: ruff-fix-outcome
- path: artifacts
-
- - name: "Read Ruff Fix Outcome"
- id: ruff_outcome
- run: |
- outcome=$(cat artifacts/ruff_fix_outcome.txt)
- echo "RUFF_FIX_OUTCOME=$outcome" >> $GITHUB_ENV
-
- - name: "Comment on PR if Ruff Fix Failed"
- if: env.RUFF_FIX_OUTCOME == 'true'
- uses: actions/github-script@v5
- with:
- script: |
- const pr_number = ${{ github.event.workflow_run.pull_requests[0].number }};
- const message = 'It seems like there are issues with the formatting. Please run `ruff check . --fix-only` and commit to address these issues.';
- github.rest.issues.createComment({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: pr_number,
- body: message
- });
diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml
index e57c6ff0f..96e81e381 100644
--- a/.github/workflows/run_tests.yml
+++ b/.github/workflows/run_tests.yml
@@ -1,6 +1,9 @@
name: Lint, Test, and Build
on:
+ push:
+ branches:
+ - main
pull_request:
types: [opened, synchronize, reopened]
@@ -24,21 +27,6 @@ jobs:
args: --fix-only --exit-non-zero-on-fix
continue-on-error: true
- - name: Determine Ruff Fix Outcome
- run: |
- if [ ${{ steps.ruff_fix.outcome }} == 'failure' ]; then
- echo "RUFF_FAILED=true" >> $GITHUB_ENV
- echo ${{ steps.ruff_fix.outcome }} > ruff_fix_outcome.txt
- else
- echo "RUFF_FAILED=false" >> $GITHUB_ENV
- echo ${{ steps.ruff_fix.outcome }} > ruff_fix_outcome.txt
- fi
-
- - uses: actions/upload-artifact@v2
- with:
- name: ruff-fix-outcome
- path: ruff_fix_outcome.txt
-
- name: Fail Workflow if Ruff Fix Failed
if: steps.ruff_fix.outcome == 'failure'
run: |
@@ -52,7 +40,6 @@ jobs:
strategy:
matrix:
python-version: ["3.9"]
- if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- name: Load cached Poetry installation
@@ -84,7 +71,6 @@ jobs:
strategy:
matrix:
python-version: ["3.9"]
- if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- name: Load cached Poetry installation
@@ -116,7 +102,6 @@ jobs:
strategy:
matrix:
python-version: ["3.9"]
- if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- name: Load cached Poetry installation