Skip to content
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

Track flutter version in a file #308

Merged
merged 2 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
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
29 changes: 29 additions & 0 deletions .github/actions/load-json/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Load JSON
description: Loads JSON data from a file.

inputs:
path:
required: true
description: "Path to the JSON file"

outputs:
data:
description: "Loaded data. Can be accessed like a Github matrix."
value: ${{ fromJson(steps.load.outputs.data) }}

runs:
using: "composite"
steps:
- name: Load JSON
id: load
shell: bash
run : |
# Load JSON from ${{ inputs.path }}
set -eu
data=$(cat '${{ inputs.path }}')

# Remove endlines
data="${data//[$'\r\n']}"

# Store result (must be in a single line)
echo "data='$data'" >> $GITHUB_OUTPUT
EduardGomezEscandell marked this conversation as resolved.
Show resolved Hide resolved
10 changes: 7 additions & 3 deletions .github/workflows/qa-azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
env:
az_name: wsl-ci-3
az_resource_group: wsl
flutter-version: 3.13.x

jobs:
build-wsl-pro-service:
Expand Down Expand Up @@ -43,10 +42,15 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version-file: go.work
- name: Load flutter version
id: load
uses: ./.github/actions/load-json
with:
path: tools/versions.json
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: ${{ env.flutter-version }}
flutter-version: ${{ steps.load.outputs.data.flutter-version }}
- name: Setup MSBuild (PATH)
uses: microsoft/[email protected]
- name: Install certificate
Expand Down Expand Up @@ -170,7 +174,7 @@ jobs:

# Uninstall Appx
Get-AppxPackage -Name "CanonicalGroupLimited.UbuntuProForWindows" | Remove-AppxPackage -ErrorAction Ignore

# Uninstall certificate
$thumbprint = (Get-PfxCertificate -FilePath "ci-artifacts\windows-agent\UbuntuProForWindows_*.cer").Thumbprint
Remove-Item -Path "Cert:LocalMachine\TrustedPeople\${thumbprint}"
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ concurrency:
group: QA-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
flutter-version: 3.13.x

jobs:
quality-go:
name: "Go Quality checks"
Expand Down Expand Up @@ -118,10 +115,15 @@ jobs:
uses: actions/setup-go@v4
with:
go-version-file: windows-agent/go.mod
- name: Load flutter version
id: load
uses: ./.github/actions/load-json
with:
path: tools/versions.json
- name: Flutter QA
uses: ./.github/actions/flutter-qa/
with:
flutter-version: ${{ env.flutter-version }}
flutter-version: ${{ steps.load.outputs.data.flutter-version }}
package-dir: '${{ matrix.package }}'
run-build-runner: ${{ contains(matrix.package, 'ubuntupro') }}
- uses: ./.github/actions/check-diff
Expand Down Expand Up @@ -151,10 +153,15 @@ jobs:
sudo DEBIAN_FRONTEND=noninteractive apt install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev unzip xvfb
- name: Check out repository
uses: actions/checkout@v4
- name: Load flutter version
id: load
uses: ./.github/actions/load-json
with:
path: tools/versions.json
- name: Flutter QA
uses: ./.github/actions/flutter-integration-test/
with:
flutter-version: ${{ env.flutter-version }}
flutter-version: ${{ steps.load.outputs.data.flutter-version }}
go-version-file: windows-agent/go.mod
# Only the app entry point is expected to have integration tests
package-dir: 'gui/packages/ubuntupro'
Expand Down
4 changes: 4 additions & 0 deletions tools/versions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"_doc": "This document is used by the CI to track versions that cannot be tracked by Go.",
"flutter-version": "3.13.x"
}
Loading