Skip to content

Fix publishing automation (#400) #471

Fix publishing automation (#400)

Fix publishing automation (#400) #471

Workflow file for this run

name: Check packages and demos
concurrency:
group: packages-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
on:
push:
branches:
- "**"
pull_request:
jobs:
setup:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
uses: ./.github/workflows/prepare_wasm.yml
build:
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
needs: [setup]
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/prepare
- name: Check formatting
run: dart format --set-exit-if-changed -o none .
- name: Prepare templates for analysis
# Copy templates to make dart analyze work in demos
run: |
find . -name "app_config_template.dart" -exec sh -c 'cp "$1" "$(dirname "$1")/app_config.dart"' _ {} \;
touch demos/supabase-trello/.env
- name: Lint
run: dart analyze --fatal-infos --fatal-warnings
- name: Publish dry-run
run: melos publish --dry-run --yes
# TODO: Uncomment after releasing powersync_flutter_libs version 0.5.0+eol.
# pana:
# runs-on: ubuntu-latest
# if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
# needs: [setup]
# steps:
# - uses: actions/checkout@v4
# - uses: ./.github/actions/prepare
# - name: Install pana
# run: dart pub global activate pana
# - name: Check powersync package
# run: dart pub global run pana --no-warning --exit-code-threshold 10
# working-directory: packages/powersync
test:
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
needs: [setup]
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/prepare
- name: Test powersync package
working-directory: packages/powersync
run: dart test -p chrome,vm
- name: Enable encryption
run: dart tool/enable_encryption.dart
- name: Encryption tests
working-directory: packages/powersync
run: dart test -p vm -P encryption