Skip to content

update actions cache to v4 #1

update actions cache to v4

update actions cache to v4 #1

Workflow file for this run

name: CI
on:
# todo: Rename to main
push:
branches: [master]
pull_request:
branches: [master]
jobs:
get_dependencies:
name: "Get dependencies"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
- name: "Print Dart SDK Version"
run: dart --version
- uses: actions/cache@v4
with:
path: .dart_tool
key: dart-dependencies-${{ hashFiles('pubspec.yaml') }}
- name: "Get dependencies"
env:
PUB_CACHE: ".dart_tool/pub_cache"
run: dart pub upgrade
analyze:
name: "Analysis"
needs: get_dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v4
with:
path: .dart_tool
key: dart-dependencies-${{ hashFiles('pubspec.yaml') }}
- uses: dart-lang/setup-dart@v1
- run: "dart format --output=none --set-exit-if-changed ."
- run: dart analyze --fatal-infos
vm_tests:
name: "Unit Tests (Dart VM)"
needs: get_dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v4
with:
path: .dart_tool
key: dart-dependencies-${{ hashFiles('pubspec.yaml') }}
- uses: dart-lang/setup-dart@v1
- run: dart test --coverage test_coverage
env:
INFURA_ID: ${{ secrets.INFURA_ID }}
- run: dart run tool/format_coverage.dart
- uses: codecov/codecov-action@v1
with:
files: lcov.info
browser_tests:
name: "Unit Tests (Browser)"
needs: get_dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v4
with:
path: .dart_tool
key: dart-dependencies-${{ hashFiles('pubspec.yaml') }}
- uses: dart-lang/setup-dart@v1
- run: dart test -x expensive --platform chrome,firefox
integration_tests:
name: "Integration Tests"
needs: get_dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v4
with:
path: .dart_tool
key: dart-dependencies-${{ hashFiles('pubspec.yaml') }}
- uses: dart-lang/setup-dart@v1
- run: sudo npm i -g ganache-cli
- run: dart run tool/integration_test.dart