Skip to content

test: Remove the whole Directory.current hack #509

test: Remove the whole Directory.current hack

test: Remove the whole Directory.current hack #509

Workflow file for this run

# Adapted from https://github.com/dart-lang/characters/blob/master/.github/workflows/test-package.yml
name: Dart CI
on:
# Run on PRs and pushes to the default branch.
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: "0 0 * * 0"
env:
PUB_ENVIRONMENT: bot.github
jobs:
# Check code formatting and static analysis on a single OS (linux)
# against stable
analyze:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [stable]
steps:
- uses: actions/checkout@v2
- uses: dart-lang/[email protected]
with:
sdk: ${{ matrix.sdk }}
- id: install
name: Install dependencies
run: dart pub get
- name: Check formatting
run: dart format --output=none --set-exit-if-changed .
if: always() && steps.install.outcome == 'success'
- name: Analyze code
run: dart analyze --fatal-infos
if: always() && steps.install.outcome == 'success'
test:
needs: analyze
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest] # FIXME: Add windows-latest, need the git executable!
sdk: [stable]
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: dart-lang/[email protected]
with:
sdk: ${{ matrix.sdk }}
- id: install
name: Install dependencies
run: dart pub get
- name: Run VM tests
run: dart test --chain-stack-traces --file-reporter="json:test-results.json"
if: always() && steps.install.outcome == 'success'
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Unit Tests ${{ matrix.os }} ${{ matrix.sdk }}
path: test-results.json
reporter: dart-json
- name: Build
run: dart compile exe bin/main.dart -o dartgit
- name: "Upload Artifact"
uses: actions/upload-artifact@v2
with:
name: dartgit
path: dartgit
if-no-files-found: error