Skip to content

Fix OQS schedule

Fix OQS schedule #35

Workflow file for this run

name: "Pull Request"
on:
pull_request:
branches: [ "main" ]
permissions:
pull-requests: write
jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@master
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: composer
- name: "Run phpunit"
run: make test
- name: "PHPStan"
uses: php-actions/phpstan@v3
with:
level: 6
calendar-diff:
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@master
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: composer
- name: "Install dependencies"
run: |
sudo apt-get update && sudo apt-get install poppler-utils -y
composer install --no-dev
- name: "Generate Calendar"
run: php app/run.php --season 2024 --output new-calendar.json --format json
- name: "Check diff"
run: |
curl -sSL "https://calendar.ifsc.stream/?format=json&nocache=1" --output old-calendar.json
php bin/calendar-diff old-calendar.json new-calendar.json > diff.md
if [ $(wc -w < diff.md) -gt 0 ]; then
echo "This PR produces the following changes in the calendar" > calendar.diff
cat diff.md >> calendar.diff
else
echo "No changes in the calendar were produced" > calendar.diff
fi
- name: "Comment calendar diff in PR"
uses: thollander/actions-comment-pull-request@v2
with:
filePath: calendar.diff
comment_tag: calendar_diff