Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions #2

Merged
merged 8 commits into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,34 @@ jobs:
channel: "stable"
architecture: x64

- name: Get Dependencies for charts_common
- name: Get Dependencies
run: |
cd charts_common
flutter pub get

- name: Get Dependencies for charts_flutter
run: |
cd charts_flutter
flutter pub get

- name: Get Dependencies for charts_flutter/example
run: |
cd charts_flutter/example
flutter pub get
for dir in charts_common charts_flutter charts_flutter/example; do
cd $dir
flutter pub get
cd $GITHUB_WORKSPACE
done

- name: Analyze
run: |
cd charts_flutter
dart analyze --no-fatal-warnings
for dir in charts_common charts_flutter charts_flutter/example; do
cd $dir
dart analyze --no-fatal-warnings
cd $GITHUB_WORKSPACE
done

- name: Check Formatting
run: |
cd charts_flutter
dart format lib test --set-exit-if-changed
for dir in charts_common charts_flutter charts_flutter/example; do
cd $dir
dart format lib test --set-exit-if-changed
cd $GITHUB_WORKSPACE
done

- name: Run Tests
run: |
cd charts_flutter
flutter test --coverage --update-goldens
flutter test --coverage

- name: Check Test Coverage
uses: VeryGoodOpenSource/very_good_coverage@v2
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/deploy_wasm_to_pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Deploy WASM to GitHub Pages

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.24.2"
channel: "stable"
architecture: x64

- name: Get dependencies
run: |
cd charts_flutter/example
flutter pub get

- name: Build WASM
run: |
cd charts_flutter/example
flutter build web --wasm

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'charts_flutter/example/build/web'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

- name: Update COOP and COEP headers
run: |
echo '
{
"headers": [
{
"source": "**/*",
"headers": [
{
"key": "Cross-Origin-Embedder-Policy",
"value": "credentialless"
},
{
"key": "Cross-Origin-Opener-Policy",
"value": "same-origin"
}
]
}
]
}
' > charts_flutter/example/build/web/_headers

- name: Upload updated artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'charts_flutter/example/build/web'

- name: Redeploy to GitHub Pages
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ build/
**/ios/Runner/GeneratedPluginRegistrant.*

charts_flutter/coverage/

charts_flutter/.DS_Store
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Discontinued

[![build_and_test](https://github.com/MelbourneDeveloper/charts/actions/workflows/build_and_test.yml/badge.svg)](https://github.com/MelbourneDeveloper/charts/actions/workflows/build_and_test.yml)

**This project is no longer maintained**, and will not receive further updates. Community members interested in collaborating on a community-maintained fork can coordinate in [this issue](https://github.com/google/charts/issues/798).

---
Expand All @@ -12,8 +14,6 @@ types and examples of how to custom components of the chart.

*Note*: This is not an official Google product.

[![Travis CI Build Status](https://travis-ci.org/google/charts.svg?branch=master)](https://travis-ci.org/google/charts)

## charts_common

[![charts_common pub package](https://img.shields.io/pub/v/charts_common.svg)](https://pub.dartlang.org/packages/charts_common)
Expand Down
Loading
Loading