Update README.md (#494) #1011
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
name: Build and Test | |
on: | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "**.md" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: | |
- polkadart | |
- polkadart_cli | |
- polkadart_example | |
- polkadart_keyring | |
- polkadart_scale_codec | |
- secp256k1_ecdsa | |
- ss58 | |
- sr25519 | |
- substrate_bip39 | |
- substrate_metadata | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.package }} | |
cancel-in-progress: true | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ env.FLUTTER_VERSION }} | |
channel: ${{ env.FLUTTER_CHANNEL }} | |
- name: Install dependencies | |
run: | | |
echo "MELOS_SDK_PATH=$MELOS_SDK_PATH" >> "${GITHUB_ENV}" | |
dart pub get | |
dart run melos bootstrap | |
env: | |
MELOS_SDK_PATH: ${{ env.FLUTTER_ROOT }} | |
- name: Generate Files for polkadart_example | |
if: ${{ matrix.package == 'polkadart_example' }} | |
run: cd examples && dart run polkadart_cli:generate -v && cd .. | |
- name: Check format | |
run: SCOPE="${{ matrix.package }}" dart run melos run format | |
- name: Analyze | |
run: SCOPE="${{ matrix.package }}" dart run melos run analyze | |
- name: Run tests | |
run: SCOPE="${{ matrix.package }}" dart run melos run test | |
- name: Run format coverage | |
run: SCOPE="${{ matrix.package }}" dart run melos run coverage | |
- uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: ${{ matrix.package }} | |
directory: ./packages/${{ matrix.package }}/coverage | |