Skip to content

Commit

Permalink
Use desktop engineering's go/generate
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardGomezEscandell committed Oct 2, 2023
1 parent 315f9ed commit 6c9a3da
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 69 deletions.
59 changes: 0 additions & 59 deletions .github/actions/go-generate-grpc/action.yaml

This file was deleted.

35 changes: 25 additions & 10 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,27 +232,42 @@ jobs:
strategy:
fail-fast: false
matrix:
subproject: ["agentapi", "wslserviceapi"]
subproject: [agentapi, wslserviceapi]
include:
- subproject: agentapi
needs-flutter: true
- subproject: wslserviceapi
needs-flutter: false
steps:
- name: Install git into the container
run: |
set -eu
DEBIAN_FRONTEND=noninteractive apt update
DEBIAN_FRONTEND=noninteractive apt install -y git
DEBIAN_FRONTEND=noninteractive apt install -y ca-certificates git protobuf-compiler jq curl unzip xz-utils
- name: Set up git
# This step needs to be done before checkout so that the checkout respects clrf
uses: canonical/ubuntu-pro-for-windows/.github/actions/setup-git@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check out repository
uses: actions/checkout@v4
- uses: ./.github/actions/go-generate-grpc
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: ${{ matrix.subproject }}/**/go.mod
tools-directory: tools
protos-directory: ${{ matrix.subproject }}
enable-dart: ${{ matrix.subproject == 'agentapi' }}
- name: Ensure generated gRPC files are up to date
uses: ./.github/actions/check-diff
go-version-file: "${{ matrix.subproject }}/go.mod"
- uses: subosito/flutter-action@v2
if: matrix.needs-flutter
with:
files-to-validate: '${{ matrix.subproject }}/{.,**}/*.{dart,go}'
channel: 'stable'
flutter-version: '3.7.x'
- name: Install Dart protoc plugin
if: matrix.needs-flutter
shell: bash
working-directory: ${{ matrix.subproject }}
run: |
dart pub global activate protoc_plugin
- name: Check gRPC is up to date
uses: canonical/desktop-engineering/gh-actions/go/generate@main
with:
working-directory: ${{ matrix.subproject }}
tools-directory: "../tools"

0 comments on commit 6c9a3da

Please sign in to comment.