Update on-pr.yaml

This commit is contained in:
Abdul Rabbani 2022-04-18 17:55:37 -04:00
parent 2f6f939982
commit 850b305bf6

View File

@ -42,35 +42,25 @@ jobs:
run: | run: |
scp -o 'StrictHostKeyChecking no' -i /tmp/key /tmp/git_repository ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository scp -o 'StrictHostKeyChecking no' -i /tmp/key /tmp/git_repository ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository
scp -o 'StrictHostKeyChecking no' -i /tmp/key /tmp/git_head_ref ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref scp -o 'StrictHostKeyChecking no' -i /tmp/key /tmp/git_head_ref ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref
scp -o 'StrictHostKeyChecking no' -i /tmp/key ./github/workflows/run_unit_test.sh ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh scp -o 'StrictHostKeyChecking no' -i /tmp/key .github/workflows/run_unit_test.sh ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh
- name: SCP some files
uses: appleboy/scp-action@master
with:
host: ${{ env.BUILD_HOSTNAME }}
username: ${{ env.BUILD_USERNAME }}
key: ${{ env.BUILD_KEY }}
port: 22
source: "/tmp/git_repository,/tmp/git_head_ref,./github/workflows/run_unit_test.sh"
target: "/tmp/"
- name: Trigger Unit Test - name: Trigger Unit Test
uses: appleboy/ssh-action@master uses: appleboy/ssh-action@master
with: with:
host: ${{ env.BUILD_HOSTNAME }} host: ${{ env.BUILD_HOSTNAME }}
username: ${{ env.BUILD_USERNAME }} username: ${{ env.BUILD_USERNAME }}
key: ${{ env.BUILD_KEY }} key_path: ${{ env.BUILD_KEY }}
port: 22 port: 22
script: /tmp/run_unit_test.sh script: /tmp/run_unit_test.sh
- name: Get the logs and cat them - name: Get the logs and cat them
run: | run: |
echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/test.log . scp -o 'StrictHostKeyChecking no' -i /tmp/key {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/test.log .
cat ./test.log cat ./test.log
- name: Check Error Code - name: Check Error Code
run: | run: |
echo ${{ env.BUILD_KEY }} | scp -i /dev/stdin {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/return_test.txt . scp -o 'StrictHostKeyChecking no' -i /tmp/key {{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/return_test.txt .
[ $(cat ./return_test.txt) -eq 0 ] [ $(cat ./return_test.txt) -eq 0 ]
# integrationtest: # integrationtest: