Skip to content

Update dependencies primarily for code generator and small linting fixes. Support analyzer 6.0 #152

Update dependencies primarily for code generator and small linting fixes. Support analyzer 6.0

Update dependencies primarily for code generator and small linting fixes. Support analyzer 6.0 #152

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
# Check code formatting and static analysis on a single OS (linux)
# against Dart dev.
analyze:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: "stable"
- name: Set up melos
run: flutter pub global activate melos
- id: install
name: Install dependencies
run: melos bootstrap
- name: build_runner code generation
run: melos build_runner
- name: Check formatting
run: dart format --set-exit-if-changed .
if: always() && steps.install.outcome == 'success'
- name: Analyze code
run: melos run analyze
if: always() && steps.install.outcome == 'success'
- run: dart run scripts/collect_examples.dart --check
if: always() && steps.install.outcome == 'success'
- id: coverage
name: Collect and report coverage
run: melos run coverage
if: always() && steps.install.outcome == 'success'
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
if: always() && steps.coverage.outcome == 'success'
with:
fail_ci_if_error: true
files: "*/coverage/lcov.info"
- name: Upload leto coverage to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
base-path: leto
path-to-lcov: "./leto/coverage/lcov.info"
flag-name: leto
parallel: true
- name: Upload leto_schema coverage to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
base-path: leto_schema
path-to-lcov: "./leto_schema/coverage/lcov.info"
flag-name: leto_schema
parallel: true
- name: Upload leto_shelf coverage to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
base-path: leto_shelf
path-to-lcov: "./leto_shelf/coverage/lcov.info"
flag-name: leto_shelf
parallel-finished: true
# Check Markdown links
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
base-branch: main
config-file: md_link_check.json
deploy-docusaurus:
name: Deploy Docusaurus to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1.3
with:
sdk: stable
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: docusaurus/package-lock.json
- run: dart run scripts/collect_examples.dart
- run: dart run scripts/generate_docusaurus.dart
- name: Install dependencies
run: cd docusaurus && npm ci
- name: Build website
run: cd docusaurus && npm run build
# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: (github.ref_name == 'docusaurus-integration' || github.ref_name == 'main') && github.event_name == 'push'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./docusaurus/build
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
# Run tests on a matrix consisting of two dimensions:
# 1. OS: ubuntu-latest, (macos-latest, windows-latest)
# 2. release channel: dev
# test:
# needs: analyze
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# # Add macos-latest and/or windows-latest if relevant for this package.
# os: [ubuntu-latest]
# steps:
# - uses: actions/checkout@v2
# - uses: subosito/flutter-action@v1
# with:
# channel: "stable"
# - name: Set up melos
# run: flutter pub global activate melos ^1.0.0-dev
# - id: install
# name: Install dependencies
# run: melos bootstrap
# - name: build_runner code generation
# run: melos build_runner
# - name: Run tests
# run: melos run test:all
# if: always() && steps.install.outcome == 'success'
# coverage:
# needs: test
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: subosito/flutter-action@v1
# with:
# channel: "stable"
# - name: Set up melos
# run: flutter pub global activate melos ^1.0.0-dev
# - id: install
# name: Install dependencies
# run: melos bootstrap
# - name: build_runner code generation
# run: melos build_runner
# - name: Collect and report coverage
# run: melos run coverage
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v2
# with:
# fail_ci_if_error: true
# files: "*/coverage/lcov.info"