Bump lints from 3.0.0 to 4.0.0 #173
Workflow file for this run
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: Checkout | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "master" | |
- "develop" | |
- "feature/**" | |
- "bugfix/**" | |
- "hotfix/**" | |
- "support/**" | |
paths: | |
- "lib/**.dart" | |
- "test/**.dart" | |
- "example/**.dart" | |
- "pubspec.yaml" | |
pull_request: | |
branches: | |
- "master" | |
- "develop" | |
- "feature/**" | |
- "bugfix/**" | |
- "hotfix/**" | |
- "support/**" | |
paths: | |
- "lib/**.dart" | |
- "test/**.dart" | |
- "example/**.dart" | |
- "pubspec.yaml" | |
jobs: | |
checkout: | |
name: "Checkout" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./ | |
container: | |
image: dart:stable | |
timeout-minutes: 10 | |
steps: | |
- name: 🚂 Get latest code | |
uses: actions/checkout@v3 | |
- name: 🚃 Cache pub modules | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-spinify-package | |
with: | |
path: | | |
$PWD/.pub_cache/ | |
key: ${{ runner.os }}-spinify-${{ env.cache-name }}-${{ hashFiles('**/pubspec.yaml') }} | |
- name: 🗄️ Export pub cache directory | |
run: export PUB_CACHE=$PWD/.pub_cache/ | |
- name: 👷 Install Dependencies | |
timeout-minutes: 1 | |
run: | | |
dart pub get --no-example | |
- name: 🔎 Check format | |
timeout-minutes: 1 | |
run: dart format --set-exit-if-changed -l 80 -o none lib/ | |
- name: 📈 Check analyzer | |
timeout-minutes: 1 | |
run: dart analyze --fatal-infos --fatal-warnings lib/ | |
- name: 🧪 Run tests | |
timeout-minutes: 2 | |
run: | | |
dart pub global activate coverage | |
dart pub global run coverage:test_with_coverage -fb -o coverage -- \ | |
--platform vm --compiler=kernel --coverage=coverage \ | |
--reporter=github --file-reporter=json:coverage/tests.json \ | |
--timeout=30s --concurrency=12 --color \ | |
test/unit_test.dart | |
- name: 📥 Upload coverage to Codecov | |
timeout-minutes: 1 | |
uses: codecov/codecov-action@v3 | |
# with: | |
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos |