Skip to content

Merge pull request #28 from polywrap/nerfzael-cors #31

Merge pull request #28 from polywrap/nerfzael-cors

Merge pull request #28 from polywrap/nerfzael-cors #31

Workflow file for this run

name: Gateway Deploy Dev
on:
push:
branches:
- develop
jobs:
Test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.69.0
override: true
- name: Setup build
run: |
sudo apt install musl-tools
rustup target add x86_64-unknown-linux-musl
- name: Build release
run: cargo build --release
working-directory: ./gateway
- name: Test release
run: cargo test --release
working-directory: ./gateway
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
working-directory: ./gateway
- name: Setup Node.js
uses: actions/setup-node@master
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
working-directory: ./gateway
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: (yarn install --nonInteractive --frozen-lockfile --prefer-offline || yarn install --nonInteractive --frozen-lockfile --prefer-offline)
working-directory: ./gateway
- name: Deploy
run: yarn deploy:dev
working-directory: ./gateway
env:
DEPLOYMENT_STAGE: dev
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_DEV }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_DEV }}
WRAP_USER_KEY: ${{ secrets.POLYWRAP_WRAPSCAN_API_KEY_DEV }}