Skip to content

dart pub upgrade --major-versions --tighten (#691) #2161

dart pub upgrade --major-versions --tighten (#691)

dart pub upgrade --major-versions --tighten (#691) #2161

Workflow file for this run

---
name: Dart CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
# See: https://docs.github.com/ja/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions#changing-github_token-permissions
# See: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
statuses: write
pull-requests: write
jobs:
dart_format:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- run: dart format . --set-exit-if-changed
dart_analyze:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- name: install dependencies
run: dart pub get
- run: dart analyze --fatal-infos --fatal-warnings .
dart_test:
needs: [dart_format, dart_analyze]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
libedax_build_command: make libbuild ARCH=x64 COMP=gcc OS=linux
- os: windows-latest
libedax_build_command: make libbuild ARCH=x64 COMP=gcc OS=windows
- os: macos-latest
libedax_build_command: make universal_osx_libbuild
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- name: build libedax
shell: bash
env:
dst: '.'
libedax_build_command: ${{ matrix.libedax_build_command }}
run: ./scripts/build_libedax.sh
# - name: setup tmate session for DEBUG
# uses: mxschmitt/action-tmate@v3
- name: install dependencies
run: dart pub get
- name: test
run: dart run test . --coverage=coverage --concurrency 1
- name: coverage
run: dart run coverage:format_coverage --lcov --in coverage --out lcov.info
- uses: codecov/codecov-action@v5
with: # ref: https://github.com/codecov/codecov-action/blob/v3.1.0/.github/workflows/main.yml
files: lcov.info
flags: unit_test,${{ matrix.os }}
fail_ci_if_error: true
# See: https://github.com/codecov/codecov-action/issues/837
# https://app.codecov.io/gh/sensuikan1973/libedax4dart/settings
token: ${{ secrets.CODECOV_TOKEN }}
- name: run example
run: |-
cd example && dart pub get && cd ..
dart example/example.dart
dart_docs:
needs: [dart_format, dart_analyze]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- run: dart doc . --validate-links
dart_pana:
needs: [dart_format, dart_analyze]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- run: dart pub get
- id: run_pana_step
run: |
pub_point_by_pana=$(dart run pana | tail -1)
echo "::set-output name=pub_point_by_pana::$pub_point_by_pana"
- uses: Sibz/github-status-action@v1
with:
authToken: ${{ secrets.GITHUB_TOKEN }}
context: Pub Points by Pana
description: ${{ steps.run_pana_step.outputs.pub_point_by_pana }}
state: success
sha: ${{ github.event.pull_request.head.sha || github.sha }}
dart_publish_dry_run:
needs: [dart_format, dart_analyze]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- run: dart pub publish --dry-run