Skip to content

Commit

Permalink
Separate output repo (eth-infinitism#4)
Browse files Browse the repository at this point in the history
* push results to separate repo
  • Loading branch information
drortirosh authored Jan 28, 2023
1 parent be2c5e8 commit bd4a582
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 21 deletions.
32 changes: 15 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,26 @@ jobs:
- run: "cd bundler-spec-tests && pdm install && pdm update-deps"
name: update submodules of bundler-spec-tests


- run: ./runall.sh
- run: ./runall.sh -k GASP
name: Run all tests.

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: build

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
- name: clone results repo
run: ./update-results.sh out-results


# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
- name: Push results to results repo
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: 'out-results'
destination-github-username: 'eth-infinitism'
destination-repository-name: 'bundler-test-results'
user-email: [email protected]
target-branch: master

# Allow one concurrent deployment
concurrency:
group: "pages"
group: "deploy"
cancel-in-progress: true

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/build/
/bundler-spec-tests/
/out-results/
1 change: 0 additions & 1 deletion CNAME

This file was deleted.

2 changes: 1 addition & 1 deletion html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h1>EIP-4337 Bundlers Spec Test Results</h1>
errmark = '&#10060;'
const dir = './out/'
async function getList() {
list = await fetch(dir+'list.txt').then(r=>r.text())
list = await fetch(dir+'index.txt').then(r=>r.text())
return list.split('\n').filter(line=>line.endsWith('json')).map(line=>dir+line)
}

Expand Down
3 changes: 1 addition & 2 deletions runall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ cat $outjson

done

#generate list of all files:
ls $OUT > $OUT/list.txt
ls $OUT > $OUT/index.txt

cd $root
cp -r html/* build/
Expand Down
21 changes: 21 additions & 0 deletions update-results.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash -xe

if [ -z "$1" ];
then
echo usage: $0 {results-clone-folder}
exit 1
fi

base=`pwd`/$1
rm -rf $base
git clone --depth 1 https://github.com/eth-infinitism/bundler-test-results.git $base
ts=`date +%Y%m%d/%H%M%S`
folder=$base/runs/$ts
mkdir -p $folder
cp build/out/* $folder
ls -p $folder > $folder/index.txt
cd $base/runs
ln -nsf $ts latest
ls -p > index.txt
find . > all.txt

0 comments on commit bd4a582

Please sign in to comment.