Skip to content

Commit

Permalink
CI Streamlining Refactor (#28748)
Browse files Browse the repository at this point in the history
Co-authored-by: ivy-branch <[email protected]>
  • Loading branch information
Sam-Armstrong and ivy-branch committed May 15, 2024
1 parent 10d0e2e commit d7b8786
Show file tree
Hide file tree
Showing 14 changed files with 256 additions and 470 deletions.
85 changes: 0 additions & 85 deletions .github/workflows/array-api-intelligent-tests-pr.yml

This file was deleted.

82 changes: 0 additions & 82 deletions .github/workflows/array-api-intelligent-tests.yml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/commit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: tests
on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
actions: read
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Ivy 🛎
uses: actions/checkout@v3
with:
path: ivy
persist-credentials: false
fetch-depth: 100

- name: Fetch Commit Changes
id: fetch_changes
run: |
cd ivy
git fetch origin main
git diff origin/main HEAD --output="commit-diff.txt"
- name: Install ivy and fetch binaries
run: |
cd ivy
sudo pip3 install -e .
mkdir .ivy
touch .ivy/key.pem
echo -n ${{ secrets.USER_API_KEY }} > .ivy/key.pem
cd ..
- name: Get Job URL
uses: Tiryoh/gha-jobid-action@v0
id: jobs
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
job_name: ${{ github.job }}

- name: Run Tests
id: tests
run: |
pip3 install pymongo
cd ivy
docker run --rm -v "$(pwd)":/ivy -v "$(pwd)"/.hypothesis:/.hypothesis unifyai/ivy:latest python3 scripts/run_tests_from_diff.py
continue-on-error: true

- name: Check on failures
if: steps.tests.outcome != 'success'
run: exit 1
44 changes: 22 additions & 22 deletions .github/workflows/duplication.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
name: duplicate-test-check
name: duplicates
on:
push:
branches:
main
pull_request:
permissions:
actions: read
jobs:
run-check:
if: contains(github.event.pull_request.labels.*.name, 'Exhaustive CI') || contains(github.event.pull_request.labels.*.name, 'Ivy API Experimental')
runs-on: ubuntu-latest
steps:
- name: Checkout Ivy 🛎
uses: actions/checkout@v2
with:
path: ivy
persist-credentials: false
submodules: "recursive"
fetch-depth: 100
test-duplicates:
runs-on: ubuntu-latest
steps:
- name: Checkout Ivy 🛎
uses: actions/checkout@v3
with:
path: ivy
persist-credentials: false
fetch-depth: 100

- name: Check Duplicate Function
id: tests
run: |
cd ivy
docker run --rm -v "$(pwd)":/ivy -v "$(pwd)"/.hypothesis:/.hypothesis unifyai/ivy:latest python3 scripts/duplicate.py
continue-on-error: true

- name: Check Duplicate Function
id: tests
run: |
cd ivy
docker run --rm -v "$(pwd)":/ivy -v "$(pwd)"/.hypothesis:/.hypothesis unifyai/ivy:latest python3 scripts/duplicate.py
continue-on-error: true

- name: Check on failures
if: steps.tests.outcome != 'success'
run: exit 1
- name: Check on failures
if: steps.tests.outcome != 'success'
run: exit 1
Loading

0 comments on commit d7b8786

Please sign in to comment.