Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests workflow #4303

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 30 additions & 19 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,44 @@ on:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build Package
run: |
CHANGED_FILES=($(git diff --name-only --diff-filter=d $THE_LAST_COMMIT HEAD))
for FILE in $CHANGED_FILES; do
if [[ $(basename $FILE) == "PKGBUILD" ]]; then
docker build -t builder -f travis/Dockerfile $(dirname $FILE)
docker run --rm builder
fi
done
pkgcheck:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pkgcheck-arch --user
pip install pkgcheck-arch
- name: Check Styling
run: |
COMMIT_RANGE=($(git diff --name-only --diff-filter=d $(git log -2 --format=%H | tr '\n' ' ')))
CHANGED_FILES=($(git diff --name-only $COMMIT_RANGE))
for FILE in $CHANGED_FILES; do
CHANGED_FILES=($(git diff --name-only --diff-filter=ACMRT origin/${{ github.event.pull_request.base.ref }}...${{ github.event.pull_request.head.sha }} | tr '\n' ' '))
for FILE in "${CHANGED_FILES[@]}"; do
if [[ $(basename $FILE) == "PKGBUILD" ]]; then
echo "Validating $FILE..."
pkgcheck $FILE
fi
done
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0

- name: Build Package
run: |
CHANGED_FILES=($(git diff --name-only --diff-filter=ACMRT origin/${{ github.event.pull_request.base.ref }}...${{ github.event.pull_request.head.sha }} | tr '\n' ' '))
for FILE in "${CHANGED_FILES[@]}"; do
if [[ $(basename $FILE) == "PKGBUILD" ]]; then
echo "Building $FILE..."
docker build --load -t builder -f travis/Dockerfile $(dirname $FILE)
docker run --rm builder
fi
done
Loading