Don't ignore devtools build for pub #516
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: Build DevTools extension | |
| run: ./tool/build.sh | |
| working-directory: packages/powersync_devtools_extension | |
| - name: Publish dry-run | |
| run: melos publish --dry-run --yes | |
| 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@v6 | |
| - 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 |