Add new job to pipeline #403
Workflow file for this run
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: Test Workflow | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
setup_and_initial_checks: | |
runs-on: ubuntu-latest | |
outputs: | |
flutter-version: ${{ steps.flutter_version.outputs.version }} | |
steps: | |
- name: Checkout mix repo | |
uses: actions/checkout@v2 | |
with: | |
path: main | |
- name: Checkout remix_ui repo | |
uses: actions/checkout@v2 | |
with: | |
repository: conceptadev/remix_ui | |
path: remix | |
ref: test-branch | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: "stable" | |
- name: Get Flutter version | |
id: flutter_version | |
run: echo "::set-output name=version::$(flutter --version)" | |
- name: Archive workspace | |
uses: actions/upload-artifact@v3 | |
with: | |
name: workspace | |
path: | | |
main | |
remix | |
test_mix_repo: | |
runs-on: ubuntu-latest | |
needs: setup_and_initial_checks | |
steps: | |
- name: Download workspace | |
uses: actions/download-artifact@v3 | |
with: | |
name: workspace | |
- run: cd main && flutter pub get | |
- run: cd main && flutter test | |
update_and_test_remix_ui: | |
runs-on: ubuntu-latest | |
needs: setup_and_initial_checks | |
steps: | |
- name: Download workspace | |
uses: actions/download-artifact@v3 | |
with: | |
name: workspace | |
- name: Add most recent mix version to remix_ui | |
run: | | |
cd remix | |
dart pub remove mix | |
dart pub add 'mix:{"git":{"url":"https://github.com/conceptadev/mix","ref":"main"}}' | |
- name: Verify if there are any undefined symbols | |
id: undefined_symbols | |
run: | | |
cd remix | |
if flutter analyze lib | grep -q 'undefined'; then | |
echo "A file contains undefined symbols. Please add a deprecated annotation before you remove it." | |
exit 1 | |
fi | |
- name: Add Label to Issue | |
if: ${{ failure() && steps.undefined_symbols.conclusion == 'failure' }} | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
github.rest.issues.addLabels({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
labels: ['New Deprecation'] | |
}) | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: 'Hello 😊, we have noticed a breaking change in our API. Please add the deprecated annotation before you remove it.' | |
}) |