-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gh actions): update workflow file to run aoloader build and test
- Loading branch information
Atticus
committed
Jun 22, 2024
1 parent
133ab59
commit bc7355a
Showing
1 changed file
with
44 additions
and
32 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,66 @@ | ||
name: Test / Deploy | ||
name: Build / Test / Deploy | ||
|
||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
integration: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/[email protected] | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
|
||
- run: yarn --frozen-lockfile | ||
- run: yarn build | ||
- run: yarn test | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
name: Check out repository code | ||
- uses: actions/checkout@v4 | ||
name: Check out repository code | ||
|
||
- name: Setup Lua | ||
uses: leafo/gh-actions-lua@v10 | ||
with: | ||
luaVersion: '5.3' # Specify the Lua version you need | ||
|
||
- name: Setup Lua | ||
uses: leafo/gh-actions-lua@v10 | ||
with: | ||
luaVersion: '5.3' # Specify the Lua version you need | ||
- name: Setup LuaRocks | ||
|
||
- name: Setup LuaRocks | ||
|
||
uses: leafo/[email protected] | ||
uses: leafo/[email protected] | ||
|
||
- name: Install Busted | ||
run: luarocks install ar-io-ao-0.1-1.rockspec | ||
- name: Install Busted | ||
run: luarocks install ar-io-ao-0.1-1.rockspec | ||
|
||
- name: Run Busted Tests | ||
run: busted . | ||
- name: Run Busted Tests | ||
run: busted . | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
needs: [integration, test] | ||
if: github.ref == 'refs/heads/develop' | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
name: Check out repository code | ||
|
||
- name: Setup Node.js | ||
uses: actions/[email protected] | ||
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 | ||
- uses: actions/checkout@v4 | ||
name: Check out repository code | ||
|
||
- name: Setup Node.js | ||
uses: actions/[email protected] | ||
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 | ||
|