gawd: A Differencing Tool for GitHub Actions
Workflows
Pooya Rostami Mazrae, Alexandre Decan, Tom Mens
University of Mons, Belgium
MSR 2024
Evolution of GitHub Actions workflow files
2
Proportion of touched lines of code.
Number of modified lines of code.
Number of added lines of code.
A Preliminary Study of GitHub Actions Workflow Changes, SATToSE 2023,
https://ceur-ws.org/Vol-3483/paper8.pdf
Example of a workflow file diff
3
Expected output
4
remove on.pull_request
change on.push from (all branches) to (branches: [master, develop])
Expected output
5
rename jobs.build to jobs.build-analyse
add jobs.build-analyse.name with 'build and analysis'
Expected output
6
move jobs.build.steps[1] to jobs.build-analyse.steps[0]
change jobs.build.steps[1].name from 'Set up with Java 11' to 'Set up with Java 17'
change jobs.build.steps[1].uses from 'actions/setup-java@v1' to 'actions/setup-java@v3’
add jobs.build-analyse.steps[0].with.distribution with 'temurin'
add jobs.build-analyse.steps[0].with.cache with 'maven’
change jobs.build.steps[1].with.java-version from 11 to 17
move jobs.build.steps[0] to jobs.build-analyse.steps[1]
change jobs.build.steps[0].uses from 'actions/checkout@v2' to 'actions/checkout@v3'
Expected output
7
add jobs.build-analyse.steps[3]
About gawd
• Open source tool
• How does it work?
• Evaluation
• Configuring gawd
8
gawd first second
[--help] [--threshold X] [--position-weight X]
[--job-name-weight X] [--short] [--json] [--verbose]
9
% gawd old_version.yaml new_version.yaml –short
removed on.pull_request with None
changed on.push from None to {'branches': ['maste (...) develop’]}
renamed jobs.build to jobs.build-analyse
added jobs.build-analyse.name with 'build and analysis’
moved jobs.build.steps[0] to jobs.build-analyse.steps[1]
changed jobs.build.steps[0].uses from 'actions/checkout@v2' to 'actions/checkout@v3’
moved jobs.build.steps[3] to jobs.build-analyse.steps[4]
added jobs.build-analyse.steps[4].with.generate-summary with True
moved jobs.build.steps[1] to jobs.build-analyse.steps[0]
changed jobs.build.steps[1].name from 'Set up with Java 11' to 'Set up with Java 17’
changed jobs.build.steps[1].uses from 'actions/setup-java@v1' to 'actions/setup-java@v3’
added jobs.build-analyse.steps[0].with.distribution with 'temurin’
added jobs.build-analyse.steps[0].with.cache with 'maven’
changed jobs.build.steps[1].with.java-version from 11 to 17
added jobs.build-analyse.steps[3] with {'name': 'Publish Te (...) eport@v1'}
gawd output
9
10
https://github.com/pooya-rostami/gawd
pip install gawd

gawd a differencing tool for GitHub Actions workflows .pdf

  • 1.
    gawd: A DifferencingTool for GitHub Actions Workflows Pooya Rostami Mazrae, Alexandre Decan, Tom Mens University of Mons, Belgium MSR 2024
  • 2.
    Evolution of GitHubActions workflow files 2 Proportion of touched lines of code. Number of modified lines of code. Number of added lines of code. A Preliminary Study of GitHub Actions Workflow Changes, SATToSE 2023, https://ceur-ws.org/Vol-3483/paper8.pdf
  • 3.
    Example of aworkflow file diff 3
  • 4.
    Expected output 4 remove on.pull_request changeon.push from (all branches) to (branches: [master, develop])
  • 5.
    Expected output 5 rename jobs.buildto jobs.build-analyse add jobs.build-analyse.name with 'build and analysis'
  • 6.
    Expected output 6 move jobs.build.steps[1]to jobs.build-analyse.steps[0] change jobs.build.steps[1].name from 'Set up with Java 11' to 'Set up with Java 17' change jobs.build.steps[1].uses from 'actions/setup-java@v1' to 'actions/setup-java@v3’ add jobs.build-analyse.steps[0].with.distribution with 'temurin' add jobs.build-analyse.steps[0].with.cache with 'maven’ change jobs.build.steps[1].with.java-version from 11 to 17 move jobs.build.steps[0] to jobs.build-analyse.steps[1] change jobs.build.steps[0].uses from 'actions/checkout@v2' to 'actions/checkout@v3'
  • 7.
  • 8.
    About gawd • Opensource tool • How does it work? • Evaluation • Configuring gawd 8 gawd first second [--help] [--threshold X] [--position-weight X] [--job-name-weight X] [--short] [--json] [--verbose]
  • 9.
    9 % gawd old_version.yamlnew_version.yaml –short removed on.pull_request with None changed on.push from None to {'branches': ['maste (...) develop’]} renamed jobs.build to jobs.build-analyse added jobs.build-analyse.name with 'build and analysis’ moved jobs.build.steps[0] to jobs.build-analyse.steps[1] changed jobs.build.steps[0].uses from 'actions/checkout@v2' to 'actions/checkout@v3’ moved jobs.build.steps[3] to jobs.build-analyse.steps[4] added jobs.build-analyse.steps[4].with.generate-summary with True moved jobs.build.steps[1] to jobs.build-analyse.steps[0] changed jobs.build.steps[1].name from 'Set up with Java 11' to 'Set up with Java 17’ changed jobs.build.steps[1].uses from 'actions/setup-java@v1' to 'actions/setup-java@v3’ added jobs.build-analyse.steps[0].with.distribution with 'temurin’ added jobs.build-analyse.steps[0].with.cache with 'maven’ changed jobs.build.steps[1].with.java-version from 11 to 17 added jobs.build-analyse.steps[3] with {'name': 'Publish Te (...) eport@v1'} gawd output 9
  • 10.