Skip to content

Commit

Permalink
github workflows: update (#51)
Browse files Browse the repository at this point in the history
* github workflows: update

* lint: fix
  • Loading branch information
tynes committed Oct 7, 2020
1 parent ac9a47f commit 2f1db86
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 44 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/integration-test.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Setup & Run Integration Test Suite

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
name: Setup & Run Integration Tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: webfactory/ssh-agent@v0.4.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY_READ }}

- name: Setup node
uses: actions/setup-node@v1

- name: Build
run: |
git clone https://github.com/ethereum-optimism/optimism-integration.git \
$HOME/optimism-integration \
--recurse-submodules
REPO=$(echo $GITHUB_REPOSITORY | cut -d '/' -f2)
cd $HOME/optimism-integration/$REPO
REMOTE="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
git remote add gh $REMOTE
git fetch gh $GITHUB_SHA
git checkout $GITHUB_SHA
cd $HOME/optimism-integration
./build.sh
- name: Test
run: |
cd $HOME/optimism-integration
./test.sh
38 changes: 38 additions & 0 deletions .github/workflows/push-to-integration-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Update submodules in integration repo

on:
push:
branches:
- master

jobs:
run:
name: Update submodules
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: webfactory/ssh-agent@v0.4.0
with:
ssh-private-key: ${{ secrets.INTEGRATION_PUSH_ACTION }}

- name: Clone repo
run: |
git clone git@github.com:ethereum-optimism/optimism-integration.git $HOME/optimism-integration
cd $HOME/optimism-integration
git submodule init && git submodule update
REPO=$(echo $GITHUB_REPOSITORY | cut -d '/' -f2)
cd $HOME/optimism-integration/$REPO
git pull origin master
- name: Commit
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
cd $HOME/optimism-integration
REPO=$(echo $GITHUB_REPOSITORY | cut -d '/' -f2)
SHORT=$(echo $GITHUB_SHA | head -c 8)
git add $REPO
git commit -m "submodule bump: $REPO $SHORT"
git push origin master

0 comments on commit 2f1db86

Please sign in to comment.