Add GitHub Actions CI and Dependabot
This commit is contained in:
parent
ef4deecdd1
commit
08baada309
2 changed files with 73 additions and 0 deletions
10
.github/dependabot.yml
vendored
Normal file
10
.github/dependabot.yml
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: pub
|
||||||
|
directory: /
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: /
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
63
.github/workflows/ci.yml
vendored
Normal file
63
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
name: Format, analyze, and validate
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
- uses: dart-lang/setup-dart@v1
|
||||||
|
- uses: actions/cache@v6
|
||||||
|
with:
|
||||||
|
path: ~/.pub-cache
|
||||||
|
key: pub-${{ runner.os }}-stable-${{ hashFiles('pubspec.yaml') }}
|
||||||
|
- run: dart pub get
|
||||||
|
- run: dart format --output=none --set-exit-if-changed .
|
||||||
|
- run: dart analyze --fatal-infos
|
||||||
|
- run: dart pub publish --dry-run
|
||||||
|
|
||||||
|
test:
|
||||||
|
name: Test (Dart ${{ matrix.sdk }}, ${{ matrix.os }})
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
# The floor declared in pubspec.yaml, and the current release.
|
||||||
|
sdk: [3.8.0, stable]
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
sdk: beta
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
- uses: dart-lang/setup-dart@v1
|
||||||
|
with:
|
||||||
|
sdk: ${{ matrix.sdk }}
|
||||||
|
- uses: actions/cache@v6
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.pub-cache
|
||||||
|
~/AppData/Local/Pub/Cache
|
||||||
|
key: pub-${{ runner.os }}-${{ matrix.sdk }}-${{ hashFiles('pubspec.yaml') }}
|
||||||
|
# libzstd_shapes_test.dart compresses its inputs with the zstd CLI and
|
||||||
|
# skips itself when there is none. Only Windows lacks it out of the box.
|
||||||
|
- if: runner.os == 'macOS'
|
||||||
|
run: command -v zstd || brew install zstd
|
||||||
|
- run: dart pub get
|
||||||
|
- run: dart test
|
||||||
|
|
||||||
|
pana:
|
||||||
|
name: pub.dev score
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
- uses: dart-lang/setup-dart@v1
|
||||||
|
- run: dart pub global activate pana
|
||||||
|
- run: dart pub global run pana --no-warning --exit-code-threshold 0 .
|
||||||
Loading…
Reference in a new issue