Skip to content

Commit

Permalink
update check
Browse files Browse the repository at this point in the history
  • Loading branch information
danyaberezun committed Feb 27, 2024
1 parent 2edfefa commit 40b8b71
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ jobs:
- uses: actions/checkout@v2
with:
ref: refs/pull/${{ github.event.pull_request.number }}/head
- name: Check pull request's name
run: |
prName="${{ github.event.pull_request.title }}"
university=`echo $prName | awk '{ sub(/.*\[/, ""); sub(/\].*/, ""); print }'`
universities=("SPBGU" "NUP" "CUB")
if [[ ! $(echo ${universities[@]} | grep -F -w $university) ]];
then
echo "FIASCO: Wrong university name or format in pull request title: $university "
exit 1
fi
echo "your university $university "
echo $university > university.txt
- name: Check branches compatibility
run: |
if [ "${{ github.base_ref }}" != "${{ github.head_ref }}" ]; then
Expand Down Expand Up @@ -46,14 +58,14 @@ jobs:
docker exec -u root -t lama-testing-image chown -R opam:opam /home/opam/lama
docker exec -u opam -w /home/opam/lama -t lama-testing-image sh -c 'eval $(opam config env) && make'
echo "Regression: All checks have successfully passed"
- name: Check Deadline
run: |
deadline=2025-03-04T23:59
if [[ $(date +'%Y-%m-%d') > $deadline ]];
then
echo "FIASCO: The deadline has expired"
exit 1
fi
# - name: Check Deadline
# run: |
# deadline=2025-03-04T23:59
# if [[ $(date +'%Y-%m-%d') > $deadline ]];
# then
# echo "FIASCO: The deadline has expired"
# exit 1
# fi
- name: Prepare results
run: |
login=${{ github.event.pull_request.user.login }}
Expand All @@ -74,3 +86,4 @@ jobs:
gitid.txt
base.txt
assignment_number.txt
university.txt

0 comments on commit 40b8b71

Please sign in to comment.