chore(deps): update dependency ubuntu to v24 #469
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: CI | |
on: | |
push: | |
branches: | |
- main | |
- 'ubuntu/**' | |
- 'canary-*' | |
pull_request: | |
branches: | |
- main | |
- 'ubuntu/**' | |
- 'canary-*' | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version: '3.10.x' | |
- name: Install lcov | |
run: sudo apt update && sudo apt install lcov | |
- name: Install subiquity dependencies | |
working-directory: ./subiquity | |
run: make install_deps | |
- name: Prepare environment for subiquity | |
run: | | |
sudo loginctl enable-linger $USER | |
sudo systemctl start user@$UID.service | |
echo "XDG_RUNTIME_DIR=/run/user/$UID" >> $GITHUB_ENV | |
- name: Run tests | |
run: | | |
flutter pub global activate melos | |
melos bootstrap | |
melos coverage | |
- name: Upload coverage results | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} | |
analyze: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: dart-lang/setup-dart@v1 | |
- run: dart pub global activate melos | |
- run: melos bootstrap | |
- run: melos analyze | |
format: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: dart-lang/setup-dart@v1 | |
- run: dart pub global activate melos | |
- run: melos bootstrap | |
- run: melos format | |
generate: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: dart-lang/setup-dart@v1 | |
- run: make generate | |
- run: dart pub global activate melos | |
- run: melos bootstrap | |
- run: melos generate | |
- name: Warn about outdated generated files | |
if: github.event_name == 'pull_request' | |
run: | | |
if [ -n "$(git status --porcelain)" ]; then | |
git diff | |
for f in $(git ls-files --modified); do | |
echo "::warning ::$f may be outdated" | |
done | |
for f in $(git ls-files --others --exclude-standard); do | |
echo "::warning ::$f may be untracked" | |
done | |
exit 1 | |
fi | |
- name: Create PR for outdated generated files | |
if: github.event_name == 'push' | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
title: 'Regenerate files on `${{github.ref_name}}`' | |
commit-message: 'Regenerate files on `${{github.ref_name}}`' | |
generator: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- run: make check | |
working-directory: ./generator |