Merge pull request #357 from canonical/chore/ubuntu-lints-v0.2.0 #380
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 | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
analyze: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: asdf-vm/actions/install@v3 | |
- uses: bluefireteam/melos-action@v3 | |
- run: melos analyze | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: asdf-vm/actions/install@v3 | |
- uses: bluefireteam/melos-action@v3 | |
- run: sudo apt update | |
- run: sudo apt install -y clang cmake curl libgtk-3-dev ninja-build pkg-config unzip xvfb | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
- run: melos build | |
coverage: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: asdf-vm/actions/install@v3 | |
- uses: bluefireteam/melos-action@v3 | |
- run: sudo apt update | |
- run: sudo apt install -y lcov | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
- run: melos run coverage | |
- uses: codecov/codecov-action@v3 | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} | |
format: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: asdf-vm/actions/install@v3 | |
- uses: bluefireteam/melos-action@v3 | |
- run: melos run format | |
integration: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: asdf-vm/actions/install@v3 | |
- uses: bluefireteam/melos-action@v3 | |
- run: sudo apt update | |
- run: sudo apt install -y clang cmake curl libgtk-3-dev ninja-build pkg-config unzip xvfb | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
- run: melos exec -c 1 --dir-exists=integration_test -- \ | |
xvfb-run -a xvfb-run -a -s '-screen 0 1024x768x24 +extension GLX' \ | |
flutter test integration_test | |
mocks: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: asdf-vm/actions/install@v3 | |
- uses: bluefireteam/melos-action@v3 | |
- run: melos generate | |
- run: ./.github/scripts/check-outdated-files.sh | |
if: github.event_name == 'pull_request' | |
- uses: peter-evans/create-pull-request@v5 | |
if: github.event_name != 'pull_request' | |
id: create-pr | |
with: | |
add-paths: '**/*.mocks.dart' | |
title: 'chore: regenerate mocks' | |
commit-message: 'chore: regenerate mocks' | |
branch: create-pull-request/mocks | |
delete-branch: true | |
l10n: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: asdf-vm/actions/install@v3 | |
- uses: bluefireteam/melos-action@v3 | |
- run: melos gen-l10n | |
- run: ./.github/scripts/check-outdated-files.sh | |
if: github.event_name == 'pull_request' | |
- uses: peter-evans/create-pull-request@v5 | |
if: github.event_name != 'pull_request' | |
id: create-pr | |
with: | |
add-paths: '**/l10n/*.dart' | |
title: 'chore: regenerate l10n' | |
commit-message: 'chore: regenerate l10n' | |
branch: create-pull-request/l10n | |
delete-branch: true | |
pub: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: asdf-vm/actions/install@v3 | |
- uses: bluefireteam/melos-action@v3 | |
- run: melos exec --no-private -- flutter pub publish --dry-run | |
test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: asdf-vm/actions/install@v3 | |
- uses: bluefireteam/melos-action@v3 | |
- run: melos test |