Skip to content

Commit

Permalink
Merge pull request #1299 from ndw/test-hack-1
Browse files Browse the repository at this point in the history
Attempt to rework how the test repository is updated
  • Loading branch information
ndw authored Jun 24, 2024
2 parents 8f3697a + 368de9f commit d8b530d
Showing 1 changed file with 18 additions and 37 deletions.
55 changes: 18 additions & 37 deletions .github/workflows/build-specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,6 @@ jobs:
- name: Install dependencies
run: sudo apt-get install tidy graphviz

- name: Checkout the tests repository
if: ${{ env.UPDATE_TESTS == 'true' && github.ref_name == env.PUBLISH_TESTS_FROM }}
uses: actions/checkout@v3
with:
repository: ${{ secrets.TEST_REPOSITORY }}
token: ${{ secrets.ACCESS_TOKEN }}
ref: 'master'

- name: Save the tests
if: ${{ env.UPDATE_TESTS == 'true' && github.ref_name == env.PUBLISH_TESTS_FROM }}
run: |
mkdir -p /tmp/test-suite/{app,array,docs,fn,map,math,misc,op,prod,ser,upd,xs}
rsync -ar ./app/ /tmp/test-suite/app/
rsync -ar ./array/ /tmp/test-suite/array/
rsync -ar ./docs/ /tmp/test-suite/docs/
rsync -ar ./fn/ /tmp/test-suite/fn/
rsync -ar ./map/ /tmp/test-suite/map/
rsync -ar ./math/ /tmp/test-suite/math/
rsync -ar ./misc/ /tmp/test-suite/misc/
rsync -ar ./op/ /tmp/test-suite/op/
rsync -ar ./prod/ /tmp/test-suite/prod/
rsync -ar ./ser/ /tmp/test-suite/ser/
rsync -ar ./upd/ /tmp/test-suite/upd/
rsync -ar ./xs/ /tmp/test-suite/xs/
- name: Checkout the specifications
uses: actions/checkout@v3

Expand Down Expand Up @@ -99,11 +74,13 @@ jobs:
branch: gh-pages
target-folder: /branch/${{ github.ref_name }}

- name: Update the saved tests
- name: Save the updated tests
if: ${{ env.UPDATE_TESTS == 'true' && github.ref_name == env.PUBLISH_TESTS_FROM }}
run: rsync -ar build/test-suite/ /tmp/test-suite/
run: |
mkdir -p /tmp/test-suite
rsync -ar build/test-suite/ /tmp/test-suite/
- name: Checkout the tests repository again
- name: Checkout the tests repository
if: ${{ env.UPDATE_TESTS == 'true' && github.ref_name == env.PUBLISH_TESTS_FROM }}
uses: actions/checkout@v3
with:
Expand All @@ -113,14 +90,18 @@ jobs:

- name: Update the tests repository
if: ${{ env.UPDATE_TESTS == 'true' && github.ref_name == env.PUBLISH_TESTS_FROM }}
run: rsync -ar /tmp/test-suite/ ./
run: rsync -var /tmp/test-suite/ ./

- name: Deploy the updated tests
- name: Any updates
if: ${{ env.UPDATE_TESTS == 'true' && github.ref_name == env.PUBLISH_TESTS_FROM }}
uses: JamesIves/github-pages-deploy-action@v4
with:
repository-name: ${{ secrets.TEST_REPOSITORY }}
token: ${{ secrets.ACCESS_TOKEN }}
branch: master
folder: .
target-folder: /
run: git status

# - name: Deploy the updated tests
# if: ${{ env.UPDATE_TESTS == 'true' && github.ref_name == env.PUBLISH_TESTS_FROM }}
# uses: JamesIves/github-pages-deploy-action@v4
# with:
# repository-name: ${{ secrets.TEST_REPOSITORY }}
# token: ${{ secrets.ACCESS_TOKEN }}
# branch: master
# folder: .
# target-folder: /

0 comments on commit d8b530d

Please sign in to comment.