Skip to content

Commit

Permalink
Merge pull request #6 from edufolly/dev
Browse files Browse the repository at this point in the history
OS matrix for tests.
  • Loading branch information
edufolly authored Mar 26, 2023
2 parents 3bb7aa4 + 60597da commit ee6095b
Show file tree
Hide file tree
Showing 14 changed files with 362 additions and 86 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/dartcodemetrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Dart Code Metrics

on: [push]

jobs:
check:
name: dart-code-metrics-action
runs-on: ubuntu-latest
# permissions:
# contents: write
steps:
- name: Code Checkout
uses: actions/checkout@v3

- name: Dart Code Metrics
uses: dart-code-checker/dart-code-metrics-action@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fatal_warnings: true
fatal_performance: true
fatal_style: true
check_unused_files: true
pull_request_comment: true
63 changes: 37 additions & 26 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,39 +44,51 @@ jobs:
channel: 'stable'
cache: true

# - name: Install lcov
# env:
# DEBIAN_FRONTEND: noninteractive
# run: |
# sudo apt-get update -y
# sudo apt install -y lcov
- name: Install lcov
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update -y
sudo apt install -y lcov
- name: Dart Pub Get
timeout-minutes: 5
timeout-minutes: 3
run: dart pub get

- name: Dart Publish Dry Run
run: dart pub publish --dry-run

- name: Dart Analyze
timeout-minutes: 5
run: dart analyze --fatal-infos

- name: Dart Test
run: dart test --coverage=coverage

# - name: Creating Test Coverage HTML
# run: |
# genhtml coverage/lcov.info \
# --output-directory coverage/html \
# --title "curt" \
# --show-details
- name: Creating package filter.
run: dart run helpers/package.dart

# - name: Publishing to GitHub Pages
# uses: peaceiris/actions-gh-pages@v3
# with:
# publish_dir: ./coverage/html
# github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Creating lcov.info
run: |
dart run coverage:format_coverage \
--packages=coverage/package.json \
--lcov \
-i coverage \
-o coverage/lcov.info
- name: Creating Test Coverage HTML
run: |
genhtml coverage/lcov.info \
--output-directory coverage/html \
--title "curt" \
--show-details
- name: Publish Dart package
uses: k-paxian/dart-package-publisher@master
with:
accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }}
refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }}
skipTests: true
format: true

- name: Publishing to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./coverage/html
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Creating a GitHub Tag
uses: mathieudutour/[email protected]
Expand All @@ -89,4 +101,3 @@ jobs:
with:
tag: v${{ needs.boot.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
# allowUpdates: true
21 changes: 13 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: Pull Request Tests
on:
pull_request:
types: [opened, reopened]

on: [pull_request]

jobs:
#########
# Tests #
#########
tests:
name: Tests
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
Expand All @@ -21,14 +23,17 @@ jobs:
channel: 'stable'
cache: true

- name: curl version
timeout-minutes: 1
run: curl -V

- name: Dart Pub Get
timeout-minutes: 5
timeout-minutes: 3
run: dart pub get

- name: Dart Analyze
timeout-minutes: 5
run: dart analyze --fatal-infos
# - name: Dart Analyze
# timeout-minutes: 3
# run: dart analyze --fatal-infos

- name: Dart Test
timeout-minutes: 5
run: dart test
128 changes: 124 additions & 4 deletions .idea/libraries/Dart_Packages.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ee6095b

Please sign in to comment.