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

Migrate Ruby tests (part 2) #8101

Merged
merged 10 commits into from
Jun 16, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Only validate images on entries or img changes
  • Loading branch information
Carlgo11 committed Jun 16, 2024
commit c0e1475a542d1ff312c855ec12e9b3ed657a6235
7 changes: 5 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
node-tests:
name: JavaScript tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -52,11 +51,14 @@ jobs:
run: |
echo "::debug:: Fetching files from ${{ github.api_url }}/repos/${{ github.repository }}/pulls/${{ github.event.number }}/files"
FILES=$(curl -s "${{ github.api_url }}/repos/${{ github.repository }}/pulls/${{ github.event.number }}/files" | jq -r '.[].filename' | tr '\n' ' ')
echo "name=${FILES}" >> $GITHUB_OUTPUT
ENTRIES=$(echo "$FILES" | tr ' ' '\n' | grep -E '^entries/.*\.json$' | tr '\n' ' ')
if [ -n "$ENTRIES" ]; then
echo "entries=${ENTRIES}" >> $GITHUB_OUTPUT
fi
IMAGES=$(echo "$FILES" | tr ' ' '\n' | grep -E '^img/.*$' | tr '\n' ' ')
if [ -n "IMAGES" ]; then
echo "images=${IMAGES}" >> $GITHUB_OUTPUT
fi

- name: Validate file extensions and permissions
run: tests/validate-fs.sh
Expand All @@ -74,6 +76,7 @@ jobs:
run: node tests/categories.js ${{ steps.diff.outputs.entries }}

- name: Validate Images
if: ${{ steps.diff.outputs.entries || steps.diff.outputs.images }}
run: node ./tests/images.js
Carlgo11 marked this conversation as resolved.
Show resolved Hide resolved

external-tests:
Expand Down