-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust main workflow and add pr-specific workflow
- Loading branch information
Showing
2 changed files
with
57 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |