Skip to content

Commit

Permalink
Adjust main workflow and add pr-specific workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
L1ghtmann authored and 0cyn committed Jan 10, 2024
1 parent 114a4d2 commit 66fd9c2
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 8 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/tests.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: tests
name: Main Repo Tests

on:
push:
Expand All @@ -11,13 +11,6 @@ on:
branches:
- master
- 'dev/**'
pull_request:
paths-ignore:
- '**/*.md'
- '**/*.txt'
branches:
- master
- 'dev/**'

jobs:
tests:
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Pr Repo Tests

on:
pull_request:
paths-ignore:
- '**/*.md'
- '**/*.txt'

jobs:
tests:
strategy:
matrix:
project-link:
- https://github.com/kritanta-ios-tweaks/Chapters
- https://github.com/kritanta-ios-tweaks/Pivot
- https://github.com/kritanta-ios-tweaks/Shakelight
- https://github.com/kritanta-ios-tweaks/Gravitation
- https://github.com/kritanta-ios-tweaks/Signe
- https://github.com/kritanta-ios-tweaks/StatusViz
- https://github.com/kritanta-ios-tweaks/DeadRinger

runs-on: macos-latest
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if ! [[ -z "${{ github.event.pull_request.head.repo.full_name }}" ]]; then
# forked repo
pip install "git+https://github.com/${{ github.event.pull_request.head.repo.full_name }}@${{ github.event.pull_request.head.ref }}"
else
# branch
pip install "git+https://github.com/dragonbuild/dragon@${{ github.head_ref }}"
fi
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install dragon
run: |
dragon
- name: Clone project
run: |
git init .
git remote add origin ${{ matrix.project-link }}
git pull origin $(git remote show origin | grep "HEAD branch" | sed 's/.*: //')
- name: Build project
run: |
dragon c b

0 comments on commit 66fd9c2

Please sign in to comment.