chore: release master #117
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Quality checks 👌🧪 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
paths-ignore: | |
- '**/*.md' | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
ci: | |
name: Dart CI Checks | |
runs-on: ubuntu-latest | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# work_dir: [ openapi-generator, openapi-generator-annotations ] | |
# defaults: | |
# run: | |
# working-directory: ${{ matrix.work_dir }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2 | |
- uses: bluefireteam/melos-action@v3 | |
- name: Install Dependencies | |
run: melos exec -- "dart pub get" | |
- name: Build runner | |
run: melos exec --depends-on="build_runner" -- bash -c "cd \$MELOS_PACKAGE_PATH && dart run build_runner build --delete-conflicting-outputs" | |
- name: Validate formatting | |
run: melos format --set-exit-if-changed | |
- name: Run analyzer | |
run: melos analyze --fatal-warnings | |
- name: Install Docker Compose | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y docker-compose | |
- name: Start Docker compose containers | |
# if: ${{ matrix.work_dir == 'openapi-generator' }} | |
run: melos exec --scope="openapi_generator" -- bash -c "cd \$MELOS_PACKAGE_PATH && docker-compose -f docker-compose.yaml up -d --build" | |
- name: Run tests | |
run: melos run test:all | |
- name: Install coverage tools | |
run: dart pub global activate coverage | |
- name: Install Coverage Tools | |
run: dart pub global activate combine_coverage | |
- name: format coverage | |
run: melos exec -- bash "$HOME/.pub-cache/bin/format_coverage --lcov --in=\$MELOS_PACKAGE_PATH/coverage/test --out=\$MELOS_PACKAGE_PATH/coverage/lcov.info --report-on=lib --report-on=bin" | |
- name: Combine Coverage Reports | |
run: dart pub global run combine_coverage --repo-path="." | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
directory: ./coverage/ | |
fail_ci_if_error: true | |
# flags: unittests | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true | |
- name: Stop Docker Container | |
run: melos exec --scope="openapi_generator" -- bash -c "cd \$MELOS_PACKAGE_PATH && docker-compose -f "docker-compose.yaml" down" | |
build: | |
name: Build example project 🛠️ | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
defaults: | |
run: | |
working-directory: example | |
steps: | |
- name: Checkout ⬇️ | |
uses: actions/checkout@v3 | |
- name: Setup Java 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Build Example Project 🛠 | |
uses: subosito/flutter-action@v2 | |
with: | |
cache: true | |
channel: 'stable' | |
- run: flutter pub get | |
- run: flutter pub run build_runner build --delete-conflicting-outputs | |
- run: flutter build apk | |
# - name: Upload artifact (Client) ⬆️💻 | |
# uses: actions/[email protected] | |
# with: | |
# name: example | |
# path: | | |
# example/build/web | |
pr_context: | |
name: Save PR context as artifact | |
if: ${{ always() && !cancelled() && github.event_name == 'pull_request' }} | |
runs-on: ubuntu-latest | |
needs: | |
# - dependency-review | |
- build | |
- ci | |
steps: | |
- name: Save PR context | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
PR_SHA: ${{ github.sha }} | |
run: | | |
echo $PR_NUMBER > PR_number | |
echo $PR_SHA > PR_sha | |
- name: Upload PR number as artifact | |
uses: actions/[email protected] | |
with: | |
name: PR_context | |
path: | | |
PR_number | |
PR_sha | |
conventional_commits: | |
name: Conventional commits check 💬 | |
if: ${{ github.event_name == 'pull_request' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ⬇️ | |
uses: actions/[email protected] | |
- name: Check if all commits comply with the specification | |
uses: webiny/[email protected] |