Support LSE collateral auctions #40
Workflow file for this run
This file contains 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: build and test | |
on: | |
pull_request: | |
jobs: | |
build-frontend: | |
name: build frontend | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Packages | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ secrets.GH_WORKFLOW_USER }} | |
password: ${{ secrets.GH_WORKFLOW_TOKEN }} | |
- name: Set outputs | |
id: vars | |
run: echo "git_hash_short=$(git rev-parse --short ${GITHUB_SHA})" >> $GITHUB_OUTPUT | |
- name: build and push frontend | |
uses: docker/build-push-action@v6 | |
with: | |
file: frontend/Dockerfile | |
context: ./ | |
target: development | |
platforms: linux/amd64 | |
tags: | | |
ghcr.io/sidestream-tech/unified-auctions-ui/frontend:${{ github.sha }} | |
push: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build-core: | |
name: build core | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Packages | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ secrets.GH_WORKFLOW_USER }} | |
password: ${{ secrets.GH_WORKFLOW_TOKEN }} | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-region: eu-central-1 | |
role-to-assume: arn:aws:iam::802385070966:role/GithubActionsSSMRole | |
role-session-name: AuctionsUiSession | |
- name: Get secrets from parameterstore | |
uses: dkershner6/aws-ssm-getparameters-action@v2 | |
with: | |
parameterPairs: "auction-ui/main.auction-ui.k8s.sidestream.tech/frontend/rpc_url = RPC_URL" | |
withDecryption: "true" | |
- name: Set outputs | |
id: vars | |
run: echo "git_hash_short=$(git rev-parse --short ${GITHUB_SHA})" >> $GITHUB_OUTPUT | |
- name: build and push core | |
uses: docker/build-push-action@v6 | |
with: | |
file: core/Dockerfile | |
context: ./ | |
target: development | |
platforms: linux/amd64 | |
build-args: | | |
REMOTE_RPC_URL=${{ env.RPC_URL }} | |
tags: | | |
ghcr.io/sidestream-tech/unified-auctions-ui/core:${{ github.sha }} | |
push: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build-hardhat: | |
name: build hardhat | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Packages | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ secrets.GH_WORKFLOW_USER }} | |
password: ${{ secrets.GH_WORKFLOW_TOKEN }} | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-region: eu-central-1 | |
role-to-assume: arn:aws:iam::802385070966:role/GithubActionsSSMRole | |
role-session-name: AuctionsUiSession | |
- name: Get secrets by name and by ARN | |
uses: dkershner6/aws-ssm-getparameters-action@v2 | |
with: | |
parameterPairs: "/auction-ui/main.auction-ui.k8s.sidestream.tech/frontend/rpc_url = RPC_URL" | |
withDecryption: "true" | |
- name: Set outputs | |
id: vars | |
run: echo "git_hash_short=$(git rev-parse --short ${GITHUB_SHA})" >> $GITHUB_OUTPUT | |
- name: build and push hardhat | |
uses: docker/build-push-action@v6 | |
with: | |
file: core/Dockerfile | |
context: ./ | |
target: hardhat | |
platforms: linux/amd64 | |
build-args: | | |
REMOTE_RPC_URL=${{ env.RPC_URL }} | |
tags: | | |
ghcr.io/sidestream-tech/unified-auctions-ui/core-hardhat:${{ github.sha }} | |
push: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build-bot: | |
name: build bot | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Packages | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ secrets.GH_WORKFLOW_USER }} | |
password: ${{ secrets.GH_WORKFLOW_TOKEN }} | |
- name: Set outputs | |
id: vars | |
run: echo "git_hash_short=$(git rev-parse --short ${GITHUB_SHA})" >> $GITHUB_OUTPUT | |
- name: build and push bot | |
uses: docker/build-push-action@v6 | |
with: | |
file: bot/Dockerfile | |
context: ./ | |
target: development | |
platforms: linux/amd64 | |
tags: | | |
ghcr.io/sidestream-tech/unified-auctions-ui/bot:${{ github.sha }} | |
push: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
core-lint-build: | |
needs: [build-frontend] | |
name: core-lint-build | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/sidestream-tech/unified-auctions-ui/frontend:${{ github.sha }} | |
credentials: | |
username: ${{ secrets.GH_WORKFLOW_USER }} | |
password: ${{ secrets.GH_WORKFLOW_TOKEN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: lint | |
run: | | |
cd /core | |
npm run lint | |
- name: build | |
run: | | |
cd /core | |
npm run build | |
frontend-lint-test: | |
needs: [build-frontend] | |
name: frontend-lint-test | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/sidestream-tech/unified-auctions-ui/frontend:${{ github.sha }} | |
credentials: | |
username: ${{ secrets.GH_WORKFLOW_USER }} | |
password: ${{ secrets.GH_WORKFLOW_TOKEN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: lint | |
run: | | |
cd /frontend | |
npm run lint | |
- name: test | |
run: | | |
cd /frontend | |
npm run test | |
bot-lint: | |
needs: [build-bot] | |
name: bot-lint | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/sidestream-tech/unified-auctions-ui/bot:${{ github.sha }} | |
credentials: | |
username: ${{ secrets.GH_WORKFLOW_USER }} | |
password: ${{ secrets.GH_WORKFLOW_TOKEN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: lint | |
run: | | |
cd /bot | |
npm run lint | |
core-integration-test: | |
needs: [build-core, build-hardhat] | |
name: core-integration-test | |
permissions: write-all | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/sidestream-tech/unified-auctions-ui/core:${{ github.sha }} | |
credentials: | |
username: ${{ secrets.GH_WORKFLOW_USER }} | |
password: ${{ secrets.GH_WORKFLOW_TOKEN }} | |
services: | |
hardhat-service: | |
image: ghcr.io/sidestream-tech/unified-auctions-ui/core-hardhat:${{ github.sha }} | |
credentials: | |
username: ${{ secrets.GH_WORKFLOW_USER }} | |
password: ${{ secrets.GH_WORKFLOW_TOKEN }} | |
ports: | |
- 8545:8545 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: core-integration-test | |
run: | | |
cd core | |
npm ci | |
npm run test | |
env: | |
LOCAL_RPC_URL: "http://hardhat-service:8545" | |
REMOTE_RPC_URL: ${{ secrets.REMOTE_RPC_URL }} |