From ed36e8c686b10fa041949077470fbe37c8678edb Mon Sep 17 00:00:00 2001 From: dtfiedler Date: Mon, 5 Aug 2024 09:34:09 -0600 Subject: [PATCH] chore(git): update github action and add yarnrc --- .github/workflows/build.yaml | 51 ++++++++++++------------------- .github/workflows/evolve-dev.yml | 23 -------------- .github/workflows/evolve-prod.yml | 23 -------------- .yarnrc | 1 + 4 files changed, 21 insertions(+), 77 deletions(-) delete mode 100644 .github/workflows/evolve-dev.yml delete mode 100644 .github/workflows/evolve-prod.yml create mode 100644 .yarnrc diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2957a706..18fb9e83 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,4 +1,4 @@ -name: Build / Test / Deploy +name: Build / Test / Evolve on: [push, workflow_dispatch] @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v4.0.2 + - uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'yarn' @@ -15,9 +15,9 @@ jobs: - run: yarn --frozen-lockfile - run: yarn build - run: yarn test - test: - runs-on: ubuntu-latest + unit: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 name: Check out repository code @@ -28,17 +28,16 @@ jobs: luaVersion: '5.3' # Specify the Lua version you need - name: Setup LuaRocks - uses: leafo/gh-actions-luarocks@v4.3.0 - name: Install Busted - run: luarocks install ar-io-ao-0.1-1.rockspec + run: luarocks install busted - name: Run Busted Tests run: busted . - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.0.1 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} @@ -46,40 +45,30 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v4.0.2 + - uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'yarn' - # chekcout the ar-io-sdk repo alpha branch - run: git clone -b alpha https://github.com/ar-io/ar-io-sdk.git - # install the sdk - - run: yarn install --ignore-engines + - run: yarn working-directory: ./ar-io-sdk - # run the e2e tests for the sdk - run: yarn test:e2e working-directory: ./ar-io-sdk - deploy: + evolve: runs-on: ubuntu-latest - needs: [integration, test] - if: github.ref == 'refs/heads/develop' - + needs: [integration, unit, sdk] + if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' + environment: ${{ github.ref_name }} steps: - uses: actions/checkout@v4 - name: Check out repository code - - - name: Setup Node.js - uses: actions/setup-node@v4.0.2 + - uses: actions/setup-node@v4 with: - node-version: '20' - - - name: Install aos - run: npm i -g https://get_ao.g8way.io - - - name: Setup wallet - run: echo '${{ secrets.WALLET }}' > wallet.json - - # TODO: should we deploy this way or use ao cli to deploy the module? - # - name: Deploy to AOS - # run: aos --load /src/main.lua --wallet wallet.json devnet + node-version-file: '.nvmrc' + cache: 'yarn' + - run: yarn --frozen-lockfile + - run: yarn evolve + env: + WALLET: ${{ secrets.WALLET }} + REGISTRY_ID: ${{ secrets.REGISTRY_ID }} diff --git a/.github/workflows/evolve-dev.yml b/.github/workflows/evolve-dev.yml deleted file mode 100644 index 2e818b4e..00000000 --- a/.github/workflows/evolve-dev.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Evolve Devnet ANT Registry - -on: - push: - branches: - - main - -jobs: - # TODO: add unit tests using bused - evolve: - runs-on: ubuntu-latest - environment: development - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4.0.2 - with: - node-version-file: '.nvmrc' - cache: 'yarn' - - run: yarn --frozen-lockfile - - run: yarn evolve - env: - WALLET: ${{ secrets.WALLET }} - REGISTRY_ID: ${{ secrets.REGISTRY_ID }} diff --git a/.github/workflows/evolve-prod.yml b/.github/workflows/evolve-prod.yml deleted file mode 100644 index f28681ba..00000000 --- a/.github/workflows/evolve-prod.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Evolve Devnet ANT Registry - -on: - push: - branches: - - main - -jobs: - # TODO: add unit tests using bused - evolve: - runs-on: ubuntu-latest - environment: production - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4.0.2 - with: - node-version-file: '.nvmrc' - cache: 'yarn' - - run: yarn --frozen-lockfile - - run: yarn evolve - env: - WALLET: ${{ secrets.WALLET }} - REGISTRY_ID: ${{ secrets.REGISTRY_ID }} diff --git a/.yarnrc b/.yarnrc new file mode 100644 index 00000000..123ac74a --- /dev/null +++ b/.yarnrc @@ -0,0 +1 @@ +ignore-engines true