Skip to content

Commit

Permalink
ci: add basic workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
pulgueta committed Sep 4, 2024
1 parent 12f5928 commit aff2cc4
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1.6.5

- name: Get Dependencies
run: dart pub get

- name: Analyze
run: dart analyze .

- name: Check Format
run: dart format . --output=none --set-exit-if-changed

- name: Run tests
run: dart test --reporter expanded
22 changes: 22 additions & 0 deletions .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Validate commit conventions

on:
pull_request:
branches: ["main"]
types: [opened, synchronize]

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: dart-lang/setup-dart@v1.6.5

- name: Get Dependencies
run: dart pub get

- name: Validate PR Commits
run: VERBOSE=true dart run commitlint_cli --from=${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to=${{ github.event.pull_request.head.sha }} --config lib/commitlint.yaml
1 change: 1 addition & 0 deletions commitlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ rules:
- 2
- 'always'
- [
'ci',
'feat',
'fix',
'docs',
Expand Down

0 comments on commit aff2cc4

Please sign in to comment.