Skip to content

Commit

Permalink
Add a workflow that fyne developer can call to help with Fyne QA.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cedric BAIL committed Jan 17, 2024
1 parent 4f617dc commit 74ac524
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/fyne-qa-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Run tests on all maintained fyne branch

on:
workflow_call:
inputs:
tags:
description: 'Tags to pass when running tests'
required: false
default: ''
type: string

jobs:
qa-develop:
uses: fyne-io/fyne/.github/workflows/fyne-qa.yml@develop
with:
branch: develop
tags: ${{ inputs.tags }}

qa-master:
uses: fyne-io/fyne/.github/workflows/fyne-qa.yml@develop
with:
branch: master
tags: ${{ inputs.tags }}

qa-v24:
uses: fyne-io/fyne/.github/workflows/fyne-qa.yml@develop
with:
branch: "release/v2.4.x"
tags: ${{ inputs.tags }}
56 changes: 56 additions & 0 deletions .github/workflows/fyne-qa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Run tests using fyne version from specified branch

on:
workflow_call:
inputs:
branch:
description: 'Branch to run tests on'
required: true
default: 'master'
type: string
tags:
description: 'Tags to pass when running tests'
required: false
default: ''
type: string

jobs:
qa:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21

- name: Install fyne dependencies
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update && sudo apt-get install gcc libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev libx11-dev xorg-dev
- name: Install fyne
env:
GOPROXY: direct
run: go install fyne.io/fyne/v2/cmd/fyne@${{ inputs.branch }}

- name: Switch to requested branch
env:
GOPROXY: direct
run: |
go get fyne.io/fyne/v2@${{ inputs.branch }}
go mod tidy
- name: Run test with tags
if: ${{ inputs.tags != '' }}
run: go test -tags ${{ inputs.tags }} ./...

- name: Run test without tags
if: ${{ inputs.tags == '' }}
run: go test ./...

- name: Build the application with fyne
run: fyne package
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,27 @@ Alternatively a list of applications using fyne can be found at [our website](ht
All Fyne apps will work without pre-installed libraries, this is one reason the apps are so portable.
However, if looking to support Fyne in a bigger way on your operating system then you can install some utilities that help to make a more complete experience.

# Helping contribute to the quality of Fyne release

Once you have created your own Fyne application, you might want to ensure that you can easily update to the latest release and that nothing get broken for your application during Fyne development cycle and get unoticed. Fyne has a lot of API and it is hard to forsee all the possible way of using its API. That why application tests are useful and as we recommend to write them just for your own to help maintain your application, they can also be put to good use to ensure Fyne release have the highest release quality for you. This is why we do maintain a GitHub action workflow that you can call to ensure to build and tests your application with Fyne current master, release and develop branch.

Here is an example workflow that will run the tests once a day a 4am UTC and that you can also trigger manually.

```yaml
name: Run tests on all maintained fyne branch every day at 4am UTC

on:
workflow_dispatch:
schedule:
- cron: "0 4 * * *"

jobs:
fyne-qa-all:
uses: fyne-io/fyne/.github/workflows/fyne-qa-all.yml@develop
```

Note, that we do not have any telemetry and do not plan to implement any. This is not going to report automatically if there is any issues either with your code or Fyne. You will receive an email from GitHub if the action fail to build and you will have to investigate the error to see if it is a bug in your application or in Fyne and if it is already known by the Fyne project. Never the less, if you have time to turn this on for your project, and can spend the time report bugs ahead of release, this will help us deliver better quality release.

## Additional apps

It is recommended that you install the following additional apps:
Expand Down

0 comments on commit 74ac524

Please sign in to comment.