Skip to content

Commit

Permalink
chore(git): update github action and add yarnrc
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Aug 5, 2024
1 parent 1fe532b commit ed36e8c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 77 deletions.
51 changes: 20 additions & 31 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build / Test / Deploy
name: Build / Test / Evolve

on: [push, workflow_dispatch]

Expand All @@ -7,17 +7,17 @@ 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'

- 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
Expand All @@ -28,58 +28,47 @@ jobs:
luaVersion: '5.3' # Specify the Lua version you need

- name: Setup LuaRocks

uses: leafo/[email protected]

- 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 }}

sdk:
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/[email protected]
- 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 }}
23 changes: 0 additions & 23 deletions .github/workflows/evolve-dev.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/evolve-prod.yml

This file was deleted.

1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignore-engines true

0 comments on commit ed36e8c

Please sign in to comment.