Skip to content

Fix tests workflow #5847

Fix tests workflow

Fix tests workflow #5847

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
pkgcheck:
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: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pkgcheck-arch
- name: Check Styling
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 "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