Skip to content

Commit

Permalink
ci(github): workflow style consistency with case and title
Browse files Browse the repository at this point in the history
  • Loading branch information
karliatto committed Jul 9, 2024
1 parent 510ba01 commit 3bfe04e
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 47 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/template-connect-test-params.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,40 @@ on:
description: "List of methods to include in tests (example: applySettings,applyFlags,getFeatures)"
type: "string"
required: false
test-pattern:
testPattern:
description: "Test pattern to use (example: `init` or `methods`)"
type: "string"
required: true
tests-firmware:
testsFirmware:
description: "Firmware version for the tests (example: 2-latest, 2.2.0, 2-main)"
type: "string"
required: false
default: "2-latest"
test-firmware-model:
testFirmwareModel:
description: "Firmware model for the tests (example: R)"
type: "string"
required: false
node-environment:
nodeEnvironment:
description: "Should the test run on nodejs environment, it runs by default."
type: "boolean"
required: false
default: true
web-environment:
webEnvironment:
description: "Should the test run on web environment, it runs by default."
type: "boolean"
required: false
default: true
test-description:
testDescription:
description: "A description to make test title more descriptive (example: 2-latest-R)"
type: "string"
required: false
default: ""

jobs:
node:
name: "node-${{ inputs.test-description }}"
name: "node-${{ inputs.testDescription }}"
runs-on: ubuntu-latest
if: ${{ inputs.node-environment }}
if: ${{ inputs.nodeEnvironment }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -55,16 +55,16 @@ jobs:
# nightly test - run without cached txs
- if: ${{ github.event_name == 'schedule' }}
run: echo "ADDITIONAL_ARGS=-c" >> "$GITHUB_ENV"
- if: ${{ inputs.test-firmware-model }}
run: echo "ADDITIONAL_ARGS=$ADDITIONAL_ARGS -m ${{ inputs.test-firmware-model }}" >> "$GITHUB_ENV"
- if: ${{ inputs.testFirmwareModel }}
run: echo "ADDITIONAL_ARGS=$ADDITIONAL_ARGS -m ${{ inputs.testFirmwareModel }}" >> "$GITHUB_ENV"
- if: ${{ inputs.methods }}
run: echo "ADDITIONAL_ARGS=$ADDITIONAL_ARGS -i ${{ inputs.methods }}" >> "$GITHUB_ENV"
- run: './docker/docker-connect-test.sh node -p "${{ inputs.test-pattern }}" -f "${{ inputs.tests-firmware }}" $ADDITIONAL_ARGS'
- run: './docker/docker-connect-test.sh node -p "${{ inputs.testPattern }}" -f "${{ inputs.testsFirmware }}" $ADDITIONAL_ARGS'

web:
name: "web-${{ inputs.test-description }}"
name: "web-${{ inputs.testDescription }}"
runs-on: ubuntu-latest
if: ${{ inputs.web-environment }}
if: ${{ inputs.webEnvironment }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -93,8 +93,8 @@ jobs:
run: echo ${{steps.download.outputs.download-path}}
- if: ${{ github.event_name == 'schedule' }}
run: echo "ADDITIONAL_ARGS=-c" >> "$GITHUB_ENV"
- if: ${{ inputs.test-firmware-model }}
run: echo "ADDITIONAL_ARGS=$ADDITIONAL_ARGS -m ${{ inputs.test-firmware-model }}" >> "$GITHUB_ENV"
- if: ${{ inputs.testFirmwareModel }}
run: echo "ADDITIONAL_ARGS=$ADDITIONAL_ARGS -m ${{ inputs.testFirmwareModel }}" >> "$GITHUB_ENV"
- if: ${{ inputs.methods }}
run: echo "ADDITIONAL_ARGS=$ADDITIONAL_ARGS -i ${{ inputs.methods }}" >> "$GITHUB_ENV"
- run: './docker/docker-connect-test.sh web -p "${{ inputs.test-pattern }}" -f "${{ inputs.tests-firmware }}" $ADDITIONAL_ARGS'
- run: './docker/docker-connect-test.sh web -p "${{ inputs.testPattern }}" -f "${{ inputs.testsFirmware }}" $ADDITIONAL_ARGS'
24 changes: 12 additions & 12 deletions .github/workflows/test-connect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ jobs:
name: daily-${{ matrix.name }}
uses: ./.github/workflows/template-connect-test-params.yml
with:
test-pattern: ${{ matrix.pattern }}
testPattern: ${{ matrix.pattern }}
methods: ${{ matrix.methods }}
tests-firmware: ${{ matrix.firmware }}
test-description: ${{ matrix.name }}
testsFirmware: ${{ matrix.firmware }}
testDescription: ${{ matrix.name }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.set-matrix.outputs.dailyMatrix) }}
Expand All @@ -105,10 +105,10 @@ jobs:
name: legacy-canary-${{ matrix.name }}
uses: ./.github/workflows/template-connect-test-params.yml
with:
test-pattern: ${{ matrix.pattern }}
testPattern: ${{ matrix.pattern }}
methods: ${{ matrix.methods }}
tests-firmware: ${{ matrix.firmware }}
test-description: ${{ matrix.name }}-${{ matrix.firmware }}
testsFirmware: ${{ matrix.firmware }}
testDescription: ${{ matrix.name }}-${{ matrix.firmware }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.set-matrix.outputs.legacyCanaryFirmwareMatrix) }}
Expand All @@ -119,13 +119,13 @@ jobs:
name: other-devices-${{ matrix.name }}-${{ matrix.model }}
uses: ./.github/workflows/template-connect-test-params.yml
with:
test-pattern: ${{ matrix.pattern }}
testPattern: ${{ matrix.pattern }}
methods: ${{ matrix.methods }}
tests-firmware: ${{ matrix.firmware }}
test-firmware-model: ${{ matrix.model }}
node-environment: ${{ matrix.node-environment }}
web-environment: ${{ matrix.web-environment }}
test-description: ${{ matrix.name }}-${{ matrix.firmware }}-${{ matrix.model }}
testsFirmware: ${{ matrix.firmware }}
testFirmwareModel: ${{ matrix.model }}
nodeEnvironment: ${{ matrix.nodeEnvironment }}
webEnvironment: ${{ matrix.webEnvironment }}
testDescription: ${{ matrix.name }}-${{ matrix.firmware }}-${{ matrix.model }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.set-matrix.outputs.otherDevicesMatrix) }}
2 changes: 1 addition & 1 deletion .github/workflows/update-connect-config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: [Check] Update Config and Create PR
name: "[Check] Update Config and Create PR"

on:
schedule:
Expand Down
36 changes: 18 additions & 18 deletions scripts/ci/connect-test-matrix-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ const otherDevices = {
tests: [
{
...groups.api,
'web-environment': true,
'node-environment': true,
webEnvironment: true,
nodeEnvironment: true,
},
{
...groups.management,
Expand All @@ -107,8 +107,8 @@ const otherDevices = {
// getFeatures test is not abstract enough to serve all models
.filter(m => m !== 'getFeatures')
.join(','),
'web-environment': false,
'node-environment': true,
webEnvironment: false,
nodeEnvironment: true,
},
{
...groups.btcOthers,
Expand All @@ -117,38 +117,38 @@ const otherDevices = {
// getAddress (decred) does not work for model R
.filter(m => m !== 'getAddress')
.join(','),
'web-environment': false,
'node-environment': true,
webEnvironment: false,
nodeEnvironment: true,
},
{
...groups.stellar,
'web-environment': false,
'node-environment': true,
webEnvironment: false,
nodeEnvironment: true,
},
{
...groups.cardano,
'web-environment': false,
'node-environment': true,
webEnvironment: false,
nodeEnvironment: true,
},
{
...groups.ethereum,
'web-environment': false,
'node-environment': true,
webEnvironment: false,
nodeEnvironment: true,
},
{
...groups.ripple,
'web-environment': false,
'node-environment': true,
webEnvironment: false,
nodeEnvironment: true,
},
{
...groups.tezos,
'web-environment': false,
'node-environment': true,
webEnvironment: false,
nodeEnvironment: true,
},
{
...groups.binance,
'web-environment': false,
'node-environment': true,
webEnvironment: false,
nodeEnvironment: true,
},
],
};
Expand Down

0 comments on commit 3bfe04e

Please sign in to comment.