Skip to content

Commit

Permalink
Merge branch 'develop' into update-turing-tests-mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
boyuan-chen authored Jun 3, 2022
2 parents bbdf62b + b47739e commit 4126181
Show file tree
Hide file tree
Showing 834 changed files with 251,252 additions and 65,529 deletions.
39 changes: 39 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#adapted from https://raw.githubusercontent.com/ethereum-optimism/optimism/develop/.circleci/config.yml
version: 2.1

jobs:
integration-tests:
machine:
image: ubuntu-2004:202111-02
docker_layer_caching: true
environment:
DOCKER_BUILDKIT: 1
parallelism: 4
steps:
- checkout
- run:
name: Bring up the stack
command: |
./scripts/build-ci.sh
BUILD=2 DAEMON=1 ./up_local.sh
working_directory: ops
- run:
name: Start background logging
working_directory: ops
background: true
command: docker-compose -f docker-compose.yml logs --follow
- run:
name: Wait for sequencer
command: bash scripts/wait-for-sequencer.sh
working_directory: ops
- run:
name: Run integration tests
command: |
circleci tests glob "../integration-tests/test/*.spec.ts" | circleci tests split | tee splits.txt
docker-compose run integration_tests $(cat splits.txt)
working_directory: ops

workflows:
main:
jobs:
- integration-tests
7 changes: 4 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
.github

node_modules
.env
**/.env
**/docker-compose.yml
**/Dockerfile
**/*_test.go

node_modules
test
**/*_test.go
build/_workspace
build/bin
build/_bin
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/boba-gas-oracle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: boba-gas-oracle unit tests

on:
push:
paths:
- 'packages/boba/gas-price-oracle/**'
branches:
- 'master'
- 'develop'
- '*rc'
- 'regenesis/*'
pull_request:
paths:
- 'packages/boba/gas-price-oracle/**'
branches:
- 'master'
- 'develop'
- '*rc'
- 'regenesis/*'
workflow_dispatch:

jobs:
tests:
runs-on: ubuntu-latest
steps:
# Monorepo tests
- uses: actions/checkout@v2

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Build
working-directory: ./
run: yarn && yarn install && yarn build

- name: Run Boba gas oracle unit tests
working-directory: ./packages/boba/gas-price-oracle
run: yarn test
21 changes: 16 additions & 5 deletions .github/workflows/boba-publish-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ jobs:
outputs:
label: ${{ steps.start-ec2-runner.outputs.label }}
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Start EC2 runner
id: start-ec2-runner
Expand All @@ -27,9 +30,14 @@ jobs:
mode: start
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
ec2-image-id: ami-00b46fa1102c70ff2
ec2-instance-type: t2.xlarge
ec2-instance-type: m4.4xlarge
subnet-id: subnet-905870ae
security-group-id: sg-0855631d714870b32
aws-resource-tags: |
[{
"Key": "Name",
"Value": "github-actions"
}]
build-publish-win:
needs: start-runner
Expand Down Expand Up @@ -84,12 +92,15 @@ jobs:
- build-publish-win # required to wait when the main job is done
runs-on: ubuntu-latest
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Stop EC2 runner
uses: machulav/ec2-github-runner@v2
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/boba-publish-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ on:
jobs:
build-publish-win:
runs-on: ubuntu-latest

# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
steps:
- name: Login to Docker Hub
uses: docker/login-action@v1
Expand All @@ -19,9 +22,8 @@ jobs:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}

- uses: actions/checkout@v2

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ jobs:
- name: golangci-lint gas-oracle
uses: golangci/golangci-lint-action@v2
with:
version: v1.29
version: v1.45.2
working-directory: go/gas-oracle
- name: golangci-lint batch-submitter
uses: golangci/golangci-lint-action@v2
with:
version: v1.29
version: v1.45.2
working-directory: go/batch-submitter
- name: golangci-lint bss-core
uses: golangci/golangci-lint-action@v2
with:
version: v1.29
version: v1.45.2
working-directory: go/bss-core
Loading

0 comments on commit 4126181

Please sign in to comment.