Skip to content

Run the Webdev tests daily with the Dart stable SDK #2251

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

Merged
merged 9 commits into from
Oct 16, 2023
Merged
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
54 changes: 54 additions & 0 deletions .github/workflows/daily_stable_testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# A CI workflow to run stable tests on a daily cron job.

name: Daily Stable Testing

on:
schedule:
- cron: "00 14 * * *" # Everyday at 3:00 PM UTC (8:00 AM PST)

env:
PUB_ENVIRONMENT: bot.github
DISPLAY: ":99"

# TODO(elliette): Consider parsing the Webdev pubspec to find the pinned DWDS
# version, and running tests against DWDS as well.
jobs:
testing_stable:
name: Testing Dart Stable SDK
runs-on: ubuntu-latest
steps:
- name: Set up stable Dart SDK
uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1
with:
sdk: stable
- name: Activate Webdev
run: dart pub global activate webdev
- name: Get Webdev version tag
id: version
run: |
echo "VERSION_TAG=$(webdev --version)" >> $GITHUB_OUTPUT
- name: Checkout Webdev at version tag
id: checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
with:
ref: webdev-v${{ steps.version.outputs.VERSION_TAG }}
- name: Upgrade deps
id: webdev_pub_upgrade
run: dart pub upgrade
working-directory: webdev
# Note: xvfb is required to run Chrome headless tests on Linux.
- name: Set up X virtual frame buffer
run: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
working-directory: webdev
- name: Run stable tests
id: webdev_stable_tests
run: dart test -j 1
if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'"
working-directory: webdev
- name: "Notify failure"
# TODO(elliette): Uncomment after determining that notifications are working.
# if: "always() && steps.webdev_stable_tests.conclusion == 'failure'"
run: |
curl -H "Content-Type: application/json" -X POST -d \
"{'text':'Daily stable tests failed! ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}'}" \
"${{ secrets.WEBDEV_NOTIFICATION_CHAT_WEBHOOK }}"