A02 Anton Surkis #1371
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Regression | |
on: # [push] | |
pull_request: | |
# pull_request_target: | |
types: [synchronize, opened, reopened, edited] | |
jobs: | |
job1: | |
runs-on: ubuntu-latest | |
# Map a step output to a job output | |
steps: | |
- name: Extract branch name | |
shell: bash | |
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
id: extract_branch | |
- uses: actions/checkout@v2 | |
with: | |
ref: refs/pull/${{ github.event.pull_request.number }}/head | |
- id: step1 | |
run: | | |
login=${{ github.event.pull_request.user.login }} | |
echo "$login" | |
if [ "${{ github.base_ref }}" != "${{ github.head_ref }}" ]; then | |
echo "FIASCO: base and head branches differs" | |
exit 1 | |
fi | |
wget -c --retry-connrefused --tries=0 -q --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet -c --retry-connrefused --tries=0 --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1grnb60AaZBCwhBqETeKOGh3tW7ggEWDJ' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1grnb60AaZBCwhBqETeKOGh3tW7ggEWDJ" -O cw-20201.tar.gz && rm -rf /tmp/cookies.txt | |
rm -rf /tmp/cookies.txt | |
docker load < cw-20201.tar.gz | |
docker run -d -it --name cw-2021 -v $(pwd):/usr/share/compiler-workout berezun/cw-2021 | |
docker exec -t cw-2021 sh test.sh | |
echo "All checks have successfully passed" | |
echo "$login" > gitid.txt | |
echo ${{ github.base_ref }} > base.txt | |
branch=${{ github.base_ref }} | |
if [[ ${branch:1:1} -eq 0 ]] | |
then | |
echo ${branch:2:1} > assignment_number.txt | |
else | |
echo ${branch:1:2} > assignment_number.txt | |
fi | |
# - name: Check Deadline | |
# run: | | |
# deadline=2022-02-07T12:00 | |
# if [[ $(date +'%Y-%m-%d') > $deadline ]]; | |
# then | |
# echo "FIASCO: The deadline has expired" | |
# exit 1 | |
# fi | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: share_info | |
path: | | |
gitid.txt | |
base.txt | |
assignment_number.txt |