add semantic-release-monorepo to build semantic-release #26
This file contains 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: Socket client - Run all tests | |
on: | |
pull_request: | |
paths: | |
- "packages/socket-client/**" | |
jobs: | |
socket-client-tests: | |
defaults: | |
run: | |
working-directory: packages/socket-client | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Dart SDK | |
uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: stable | |
- run: git config --global user.name SuperViz | |
- run: git config --global user.email [email protected] | |
- name: Intalling dependencies | |
run: dart pub get | |
- name: Verify formatting | |
id: format_check | |
run: dart format --output=write --set-exit-if-changed . | |
continue-on-error: true | |
- name: Check if formatting changed | |
id: format_changed | |
run: echo "formatting_changed=$(test -n "$(git status --porcelain)" && echo true || echo false)" >> $GITHUB_ENV | |
- name: Commit changes | |
if: steps.format_changed.outputs.formatting_changed == 'true' | |
run: | | |
git add . | |
git commit -m "chore(release): format code [skip ci]" || echo "No changes to commit" | |
git push | |
- name: Running build runner | |
run: dart run build_runner build | |
- name: Analyze project source | |
run: dart analyze | |
continue-on-error: true | |
- name: Running tests | |
run: dart test |