Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: restructured, cleaned, added pub.dev checks #108

Merged
merged 10 commits into from
Dec 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .github/workflows/analysis.yml

This file was deleted.

19 changes: 9 additions & 10 deletions .github/workflows/deploy_demo.yaml → .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Demo
name: cd

on:
push:
Expand All @@ -7,19 +7,18 @@ on:
workflow_dispatch:

jobs:
deploy-for-web:
deploy-demo:
name: "Deploy demo app"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: beta
- run: flutter config --enable-web
- run: flutter pub get
- name: Build for web
- name: "Checkout repo"
uses: actions/checkout@v2
- name: "Install Flutter"
uses: subosito/flutter-action@v1
- name: "Build demo app for web"
working-directory: demo/
run: flutter build web --release
- name: Deploy
- name: "Deploy demo app to Github Pages"
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: ci

on: [push, pull_request]

jobs:
analyze:
name: "Flutter Analyze"
runs-on: ubuntu-latest
steps:
- name: "Checkout repo"
uses: actions/checkout@v2
- name: "Install Flutter"
uses: subosito/flutter-action@v1
- name: "Install dependencies"
run: flutter pub get && (cd demo && flutter pub get)
- name: "Analyze Dart code"
run: flutter analyze . --fatal-infos

pub_dev_publish_check:
name: "Check pub.dev requirements"
runs-on: ubuntu-latest
steps:
- name: "Checkout repo"
uses: actions/checkout@v2
- name: "Install Flutter"
uses: subosito/flutter-action@v1
- name: "Install dependencies"
run: flutter pub get && (cd demo && flutter pub get)
- name: "Pub Check"
run: pub publish --dry-run

check_formatting:
name: "Check code formatting"
runs-on: ubuntu-latest
steps:
- name: "Checkout repo"
uses: actions/checkout@v2
- name: "Install Flutter"
uses: subosito/flutter-action@v1
- name: "Install dependencies"
run: flutter pub get && (cd demo && flutter pub get)
- name: "Validate Dart formatting"
run: |
flutter format .
./.github/workflows/scripts/validate-formatting.sh
18 changes: 18 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: pr

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
validate-pr-title:
name: "Validate PR title"
runs-on: ubuntu-latest
steps:
- name: "Validate PR title follows Conventional Commit format"
uses: amannn/action-semantic-pull-request@v3.4.6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 0 additions & 18 deletions .github/workflows/pr_title.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p>
<a href="https://pub.dev/packages/backdrop"><img src="https://img.shields.io/pub/v/backdrop?logo=dart" alt="pub.dev"></a>
<a href="https://github.com/fluttercommunity/backdrop/actions?query=workflow%3Aanalysis"><img src="https://github.com/fluttercommunity/backdrop/workflows/analysis/badge.svg" alt="analysis"></a>
<a href="https://github.com/fluttercommunity/backdrop/actions/workflows/ci.yml"><img src="https://github.com/fluttercommunity/backdrop/actions/workflows/ci.yml/badge.svg" alt="ci"></a>
<a href="https://fluttercommunity.github.io/backdrop/demo/#/"><img src="https://img.shields.io/badge/check-demo-blueviolet" alt="Demo"></a>
<a href="https://github.com/Solido/awesome-flutter"><img alt="Awesome Flutter" src="https://img.shields.io/badge/Awesome-Flutter-blue.svg?longCache=true" /></a>
<a href="https://gitter.im/flutter-backdrop/community?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge"><img src="https://badges.gitter.im/flutter-backdrop/community.svg" alt="Gitter"></a>
Expand Down