Skip to content

TestSuite

TestSuite #912

Workflow file for this run

name: TestSuite
on:
schedule:
- cron: "0 0 * * *"
push:
branches:
- main
pull_request:
env:
REJECT_SEED: ${{ secrets.REJECT_SEED }}
TRON_SEED: ${{ secrets.TRON_SEED }}
ETHERSCAN_API_KEYS: ${{ secrets.ETHERSCAN_API_KEYS }}
TRONSCAN_API_KEYS: ${{ secrets.TRONSCAN_API_KEYS }}
DEV_SEED: ${{ secrets.DEV_SEED }}
jobs:
lint:
name: Static code analysis and run unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Dart SDK
uses: dart-lang/setup-dart@v1
with:
sdk: 'stable'
- name: Print Dart version
run: dart --version
- name: Initialize submodules
run: git submodule update --init --recursive
- name: Get dependencies
run: |
dart pub get
cd packages/bip39 && dart pub get
continue-on-error: false
- name: Navigate back to root
run: |
cd ..
cd ..
- name: Dart analyze
run: dart analyze
continue-on-error: true
- name: Run CI tests
run: dart test test/ci
continue-on-error: false
generate-docs:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
contents: write # Required for pushing to gh-pages
pages: write # Required for deploying to Pages
id-token: write # Required for authentication
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Setup Dart SDK
uses: dart-lang/setup-dart@v1
with:
sdk: 'stable'
- name: Initialize submodules
run: git submodule update --init --recursive
- name: Get dependencies
run: |
cd packages/bip39
dart pub get
cd ../..
dart pub get
- name: Install dartdoc
run: dart pub global activate dartdoc
- name: Generate API docs
run: dart pub global run dartdoc
- name: Prepare docs directory
run: |
rm -rf docs
mkdir -p docs
cp -R doc/api/* docs/
- name: Deploy to Github Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
force_orphan: true
commit_message: 'docs: update documentation'
enable_jekyll: false
full_commit_message: 'docs: update API documentation'