Skip to content

Commit

Permalink
Add presubmit builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Pante committed Mar 11, 2024
1 parent ec7f12a commit c07270d
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/forui_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ on:
paths:
- .github/workflows/forui_build.yaml
- forui/**
- forui_assets/**

pull_request:
paths:
- .github/workflows/forui_build.yaml
- forui/**
- forui_assets/**

jobs:
test:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/forui_presubmit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Forui Presubmit

on:
workflow_dispatch: {}
pull_request:
branches: [ master ]
paths:
- .github/workflows/forui_presubmit.yaml
- forui/**

jobs:
prepare:
if: github.actor != 'forus-labs-token-mint'
name: Prepare PR for review
runs-on: ubuntu-latest
defaults:
run:
working-directory: forui

steps:
- uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.TOKEN_MINT_APP_ID }}
private_key: ${{ secrets.TOKEN_MINT_PRIVATE_KEY }}

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
token: ${{ steps.generate-token.outputs.token }}
ref: ${{ github.event.pull_request.head.ref }}

- uses: subosito/[email protected]
with:
cache: true

- uses: dart-lang/[email protected]

- run: flutter pub get
- run: flutter pub global activate import_sorter
- run: flutter pub global run import_sorter:main
- run: flutter pub run build_runner build --delete-conflicting-outputs
- run: dart fix --apply

- uses: EndBug/add-and-commit@v9
with:
add: '*'
push: true
47 changes: 47 additions & 0 deletions .github/workflows/samples_presubmit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Samples Presubmit

on:
workflow_dispatch: {}
pull_request:
branches: [ master ]
paths:
- .github/workflows/samples_presubmit.yaml
- samples/**

jobs:
prepare:
if: github.actor != 'forus-labs-token-mint'
name: Prepare PR for review
runs-on: ubuntu-latest
defaults:
run:
working-directory: samples

steps:
- uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.TOKEN_MINT_APP_ID }}
private_key: ${{ secrets.TOKEN_MINT_PRIVATE_KEY }}

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
token: ${{ steps.generate-token.outputs.token }}
ref: ${{ github.event.pull_request.head.ref }}

- uses: subosito/[email protected]
with:
cache: true

- uses: dart-lang/[email protected]

- run: flutter pub get
- run: flutter pub global activate import_sorter
- run: flutter pub global run import_sorter:main
- run: flutter pub run build_runner build --delete-conflicting-outputs
- run: dart fix --apply

- uses: EndBug/add-and-commit@v9
with:
add: '*'
push: true
10 changes: 5 additions & 5 deletions samples/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ packages:
description:
path: stevia_runner
ref: HEAD
resolved-ref: "81c03faae1e2d4baaa49788db3265b9f9c2e7fd3"
resolved-ref: f8e5e00e12f23fc0fc659b48a71d033e0aaf4bfe
url: "https://github.com/forus-labs/cauldron.git"
source: git
version: "1.0.0"
Expand Down Expand Up @@ -628,10 +628,10 @@ packages:
dependency: transitive
description:
name: web
sha256: "1d9158c616048c38f712a6646e317a3426da10e884447626167240d45209cbad"
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
url: "https://pub.dev"
source: hosted
version: "0.5.0"
version: "0.5.1"
web_socket_channel:
dependency: transitive
description:
Expand All @@ -644,10 +644,10 @@ packages:
dependency: transitive
description:
name: win32
sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8"
sha256: "8cb58b45c47dcb42ab3651533626161d6b67a2921917d8d429791f76972b3480"
url: "https://pub.dev"
source: hosted
version: "5.2.0"
version: "5.3.0"
xdg_directories:
dependency: transitive
description:
Expand Down

0 comments on commit c07270d

Please sign in to comment.