Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
leoafarias committed Sep 11, 2023
1 parent 37fe37b commit bda76e4
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 39 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/common-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Common Tests

on:
workflow_call:

jobs:
test:
name: "${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
sdk-version: [stable]
include:
- os: macOS-latest
TARGET: macos
- os: ubuntu-latest
TARGET: linux
- os: windows-latest
TARGET: windows

steps:
- uses: actions/checkout@v1
- uses: dart-lang/[email protected]
- name: Cache Dart dependencies
uses: actions/cache@v2
with:
path: "~/.pub-cache"
key: ${{ runner.os }}-dart-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-dart-
- run: dart pub get

- run: ./scripts/build_version.dart
- run: dart analyze --fatal-infos --fatal-warnings .

- name: Generate git cache
run: ./bin/fvm.dart install master

- run: dart test
8 changes: 3 additions & 5 deletions .github/workflows/deploy_chocolatey.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
env:
CHOCOLATEY_TOKEN: ${{ secrets.CHOCOLATEY_TOKEN }}
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Setup Dart
uses: DanTup/gh-actions/setup-dart@master
Expand All @@ -27,11 +27,9 @@ jobs:
- name: Install dependencies
run: dart pub get

- name: Run Builder for Version
run: dart pub run build_runner build --delete-conflicting-outputs
- run: ./scripts/build_version.dart

- name: Run Test
run: dart pub run test
- run: dart pub run test

- name: Deploy Chocolatey (Windows)
run: dart pub run grinder pkg-chocolatey-deploy
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
run: dart pub get

- run: ./scripts/build_version.dart
- run: ./bin/fvm.dart install master
- run: dart test

release:
Expand Down
35 changes: 1 addition & 34 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,4 @@ concurrency:

jobs:
test:
name: "${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
sdk-version: [stable]
include:
- os: macOS-latest
TARGET: macos
- os: ubuntu-latest
TARGET: linux
- os: windows-latest
TARGET: windows

steps:
- uses: actions/checkout@v1
- uses: dart-lang/[email protected]
- name: Cache Dart dependencies
uses: actions/cache@v2
with:
path: "~/.pub-cache"
key: ${{ runner.os }}-dart-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-dart-
- run: dart pub get

- run: ./scripts/build_verssion.dart
- run: dart analyze --fatal-infos --fatal-warnings .

- name: Generate git cache
run: ./bin/fvm.dart install master

- run: dart test
uses: ./.github/workflows/common-tests.yml

0 comments on commit bda76e4

Please sign in to comment.