GHA| test.yml; install.sh does not seem to work in GHA #23
This file contains hidden or 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: CI Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| test-ubuntu: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Clone to compare directory | |
| run: | | |
| mkdir -p git-pad-test | |
| git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} ./git-pad-test/R1 | |
| git clone --bare https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} ./git-pad-test/bare1.git | |
| - name: install script | |
| id : install | |
| shell: bash | |
| run: bash install.sh; bash get_rc.sh; cat $(bash get_rc.sh) | |
| - name: Run tests | |
| id: tests | |
| #continue-on-error: true | |
| run: | | |
| PATH=$PATH:$PWD | |
| #bash install.sh | |
| #bash get_rc.sh; cat $(bash get_rc.sh) | |
| cd git-pad-test && echo "git-pad-test" | |
| git config --global user.email "kwhkim@gha" | |
| git config --global user.name "kwhkim" | |
| cd R1 && echo "R1" | |
| bash test_completion.bash | |
| git pad list || true | |
| git pad status || true | |
| git pad remote || true | |
| git pad track || true | |
| git pad init --no-clone | |
| git pad new --title="first issue" --body="This is for testing" | |
| git pad new --title="second issue" --body="This is second issue" | |
| git pad status | |
| git pad commit -m "R1 first commit" | |
| git pad list | |
| git pad new --title="third issue" --body="This is the third" | |
| git pad status | |
| git pad commit -m "R1 second commit" | |
| git remote add local ../bare1.git | |
| git pad track local | |
| git pad push local | |
| cd .. | |
| if [ ! -d R2 ]; then git clone bare1.git R2; fi | |
| cd R2 && echo R2 | |
| git pad clone | |
| git pad list | |
| git pad status | |
| git pad new --title="4th issue" --body="This is 4th" --type="announcement" --priority="P1" | |
| git pad new --title="5th issue" --body="This happens when ..." --type="bug" --priority="P1" | |
| git pad commit -m "R2 issue number 4 and 5" | |
| git pad push | |
| cd .. | |
| if [ ! -d R3 ]; then git clone bare1.git R3; fi | |
| cd R3 && echo R3 | |
| git pad init --clone | |
| git pad list | |
| git pad status | |
| git pad pull | |
| pwd | |
| cd .. | |
| if [ ! -d R4 ]; then git clone bare1.git R4; fi | |
| if [ ! -d R5 ]; then git clone bare1.git R5; fi | |
| pwd | |
| cd R5 && git pad init --clone && cd .. | |
| pwd | |
| cd R4 | |
| git pad clone | |
| id=$(git pad list | awk '{print $1}' | grep -v ID | head -1) | |
| git pad comment "$id" -m "Looks good. keep it up" | |
| git pad new --title="6th issue" --body="This is 6th" --type="announcement" --priority="P2" | |
| git pad commit -m "R4 commit 1" | |
| git pad new --title="7th issue" --body="This happens when ..." --type="bug" --priority="P2" | |
| git pad commit -m "R4 commit 2" | |
| git pad push | |
| cd .. | |
| cd R3 | |
| pwd | |
| git pad pull | |
| cd .. | |
| cd R5 | |
| pwd | |
| git pad new --title="6th another issue" --body="This is 6th" --type="announcement" --priority="P2" | |
| git pad commit -m "R5 commit 1b" | |
| git pad new --title="7th another issue" --body="This happens when ..." --type="bug" --priority="P2" | |
| git pad commit -m "R5 commit 2b" | |
| id=$(git pad list | awk '{print $1}' | grep -v ID | head -1) | |
| git pad comment "$id" -m "Let's get rolling." | |
| git pad push || true | |
| git pad pull | |
| git pad list | |
| cd - | |
| if [ ! -d R6 ]; then git clone bare1.git R6; fi | |
| - name: Upload test artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-output-ubuntu | |
| path: git-pad-test/artifacts/ | |
| - name: Fail if tests failed | |
| if: steps.tests.outcome == 'failure' | |
| run: exit 1 | |
| test-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Clone to compare directory | |
| run: | | |
| mkdir -p git-pad-test | |
| git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} ./git-pad-test/R1 | |
| git clone --bare https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} ./git-pad-test/bare1.git | |
| # - name: Run tests | |
| # id: tests | |
| # continue-on-error: true | |
| # run: | | |
| # PATH=$PATH:$PWD | |
| # mkdir -p git-pad-test | |
| # mkdir -p git-pad-test/artifacts | |
| # echo "Running tests..." | |
| # cd git-pad-test | |
| # #./run_gh_tests.sh > artifacts/test.log 2>&1 | |
| # bash -x ../run_test_issues.sh > artifacts/run_test_issues.log 2>&1 | |
| - name: install script | |
| id : install | |
| shell: bash | |
| run: bash install.sh; bash get_rc.sh; cat $(bash get_rc.sh) | |
| - name: Run tests | |
| id: tests | |
| #continue-on-error: true | |
| run: | | |
| PATH=$PATH:$PWD | |
| #bash install.sh | |
| #bash get_rc.sh; cat $(bash get_rc.sh) | |
| cd git-pad-test && echo "git-pad-test" | |
| git config --global user.email "kwhkim@gha" | |
| git config --global user.name "kwhkim" | |
| cd R1 && echo "R1" | |
| git pad list || true | |
| git pad status || true | |
| git pad remote || true | |
| git pad track || true | |
| git pad init --no-clone | |
| git pad new --title="first issue" --body="This is for testing" | |
| git pad new --title="second issue" --body="This is second issue" | |
| git pad status | |
| git pad commit -m "R1 first commit" | |
| git pad list | |
| git pad new --title="third issue" --body="This is the third" | |
| git pad status | |
| git pad commit -m "R1 second commit" | |
| git remote add local ../bare1.git | |
| git pad track local | |
| git pad push local | |
| cd .. | |
| if [ ! -d R2 ]; then git clone bare1.git R2; fi | |
| cd R2 && echo R2 | |
| git pad clone | |
| git pad list | |
| git pad status | |
| git pad new --title="4th issue" --body="This is 4th" --type="announcement" --priority="P1" | |
| git pad new --title="5th issue" --body="This happens when ..." --type="bug" --priority="P1" | |
| git pad commit -m "R2 issue number 4 and 5" | |
| git pad push | |
| cd .. | |
| if [ ! -d R3 ]; then git clone bare1.git R3; fi | |
| cd R3 && echo R3 | |
| git pad init --clone | |
| git pad list | |
| git pad status | |
| git pad pull | |
| pwd | |
| cd .. | |
| if [ ! -d R4 ]; then git clone bare1.git R4; fi | |
| if [ ! -d R5 ]; then git clone bare1.git R5; fi | |
| pwd | |
| cd R5 && git pad init --clone && cd .. | |
| pwd | |
| cd R4 | |
| git pad clone | |
| id=$(git pad list | awk '{print $1}' | grep -v ID | head -1) | |
| git pad comment "$id" -m "Looks good. keep it up" | |
| git pad new --title="6th issue" --body="This is 6th" --type="announcement" --priority="P2" | |
| git pad commit -m "R4 commit 1" | |
| git pad new --title="7th issue" --body="This happens when ..." --type="bug" --priority="P2" | |
| git pad commit -m "R4 commit 2" | |
| git pad push | |
| cd .. | |
| cd R3 | |
| pwd | |
| git pad pull | |
| cd .. | |
| cd R5 | |
| pwd | |
| git pad new --title="6th another issue" --body="This is 6th" --type="announcement" --priority="P2" | |
| git pad commit -m "R5 commit 1b" | |
| git pad new --title="7th another issue" --body="This happens when ..." --type="bug" --priority="P2" | |
| git pad commit -m "R5 commit 2b" | |
| id=$(git pad list | awk '{print $1}' | grep -v ID | head -1) | |
| git pad comment "$id" -m "Let's get rolling." | |
| git pad push || true | |
| git pad pull | |
| git pad list | |
| cd - | |
| if [ ! -d R6 ]; then git clone bare1.git R6; fi | |
| - name: Upload test artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-output-macos | |
| path: artifacts/ | |
| - name: Fail if tests failed | |
| if: steps.tests.outcome == 'failure' | |
| run: exit 1 | |
| test-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Clone to compare directory | |
| run: | | |
| mkdir -p git-pad-test | |
| git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} ./git-pad-test/R1 | |
| git clone --bare https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} ./git-pad-test/bare1.git | |
| - name: Show shell info | |
| shell: bash | |
| run: | | |
| mkdir -p artifacts | |
| { | |
| echo "Shell: $SHELL" | |
| uname -a | |
| which bash | |
| pwd | |
| ls -la | |
| } > artifacts/test_shell.txt 2>&1 | |
| # - name: Run tests | |
| # id: tests | |
| # shell: bash | |
| # continue-on-error: true | |
| # run: | | |
| # PATH=$PATH:$PWD | |
| # mkdir -p git-pad-test | |
| # mkdir -p git-pad-test/artifacts | |
| # echo "Running tests..." | |
| # cd git-pad-test | |
| # #./run_gh_tests.sh > artifacts/test.log 2>&1 | |
| # bash -x ../run_test_issues.sh > artifacts/run_test_issues.log 2>&1 | |
| - name: install script | |
| id : install | |
| shell: bash | |
| run: bash install.sh; bash get_rc.sh; cat $(bash get_rc.sh) | |
| - name: Run tests | |
| id: tests | |
| shell: bash | |
| #continue-on-error: true | |
| run: | | |
| echo $PATH | |
| PATH=$PATH:$PWD | |
| #bash get_rc.sh; cat $(bash get_rc.sh) | |
| cd git-pad-test && echo "git-pad-test" | |
| git config --global user.email "kwhkim@gha" | |
| git config --global user.name "kwhkim" | |
| cd R1 && echo "R1" | |
| bash test_completion.bash | |
| git pad list || true | |
| git pad status || true | |
| git pad remote || true | |
| git pad track || true | |
| git pad init --no-clone | |
| git pad new --title="first issue" --body="This is for testing" | |
| git pad new --title="second issue" --body="This is second issue" | |
| git pad status | |
| git pad commit -m "R1 first commit" | |
| git pad list | |
| git pad new --title="third issue" --body="This is the third" | |
| git pad status | |
| git pad commit -m "R1 second commit" | |
| git remote add local ../bare1.git | |
| git pad track local | |
| git pad push local | |
| cd .. | |
| if [ ! -d R2 ]; then git clone bare1.git R2; fi | |
| cd R2 && echo R2 | |
| git pad clone | |
| git pad list | |
| git pad status | |
| git pad new --title="4th issue" --body="This is 4th" --type="announcement" --priority="P1" | |
| git pad new --title="5th issue" --body="This happens when ..." --type="bug" --priority="P1" | |
| git pad commit -m "R2 issue number 4 and 5" | |
| git pad push | |
| cd .. | |
| if [ ! -d R3 ]; then git clone bare1.git R3; fi | |
| cd R3 && echo R3 | |
| git pad init --clone | |
| git pad list | |
| git pad status | |
| git pad pull | |
| pwd | |
| cd .. | |
| if [ ! -d R4 ]; then git clone bare1.git R4; fi | |
| if [ ! -d R5 ]; then git clone bare1.git R5; fi | |
| pwd | |
| cd R5 && git pad init --clone && cd .. | |
| pwd | |
| cd R4 | |
| git pad clone | |
| id=$(git pad list | awk '{print $1}' | grep -v ID | head -1) | |
| git pad comment "$id" -m "Looks good. keep it up" | |
| git pad new --title="6th issue" --body="This is 6th" --type="announcement" --priority="P2" | |
| git pad commit -m "R4 commit 1" | |
| git pad new --title="7th issue" --body="This happens when ..." --type="bug" --priority="P2" | |
| git pad commit -m "R4 commit 2" | |
| git pad push | |
| cd .. | |
| cd R3 | |
| pwd | |
| git pad pull | |
| cd .. | |
| cd R5 | |
| pwd | |
| git pad new --title="6th another issue" --body="This is 6th" --type="announcement" --priority="P2" | |
| git pad commit -m "R5 commit 1b" | |
| git pad new --title="7th another issue" --body="This happens when ..." --type="bug" --priority="P2" | |
| git pad commit -m "R5 commit 2b" | |
| id=$(git pad list | awk '{print $1}' | grep -v ID | head -1) | |
| git pad comment "$id" -m "Let's get rolling." | |
| git pad push || true | |
| git pad pull | |
| git pad list | |
| cd - | |
| if [ ! -d R6 ]; then git clone bare1.git R6; fi | |
| - name: Upload test artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-output-windows | |
| path: artifacts/ | |
| - name: Fail if tests failed | |
| if: steps.tests.outcome == 'failure' | |
| run: exit 1 | |