Skip to content

Commit 3a3ebcf

Browse files
authored
chore(ci): add workflow for testing ionicons dev build (#28345)
Issue number: N/A --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Testing Ionicons in Ionic is currently difficult. Developers need to a) create a dev build of Ionicons, b) create a branch in Ionic, c) install the dev build in Ionic core, d) push the branch, and e) create a draft PR to watch the CI process run. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Introduces a workflow dispatch option for our CI process. This allows developers to run the CI process for any branch without creating PR. - I also added an optional input so devs can specify the ionicons version if they want to pass a special version. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
1 parent feda7a0 commit 3a3ebcf

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/workflows/actions/build-core/action.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: 'Build Ionic Core'
22
description: 'Build Ionic Core'
3+
inputs:
4+
ionicons-version:
5+
description: 'The NPM tag of ionicons to install.'
6+
type: string
7+
required: false
38
runs:
49
using: 'composite'
510
steps:
@@ -11,6 +16,13 @@ runs:
1116
run: npm install
1217
working-directory: ./core
1318
shell: bash
19+
# If an Ionicons version was specified install that.
20+
# Otherwise just use the version defined in the package.json.
21+
- name: Install Ionicons Version
22+
if: inputs.ionicons-version != ''
23+
run: npm install ionicons@${{ inputs.ionicons-version }}
24+
working-directory: ./core
25+
shell: bash
1426
- name: Build Core
1527
run: npm run build -- --ci
1628
working-directory: ./core

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ on:
44
pull_request:
55
branches: [ '**' ]
66
merge_group:
7+
workflow_dispatch:
8+
inputs:
9+
ionicons_npm_release_tag:
10+
required: false
11+
type: string
12+
description: What version of ionicons should be pulled from NPM? Use this if you want to test a custom version of Ionicons with Ionic.
713

814
# When pushing a new commit we should
915
# cancel the previous test run to not
@@ -18,6 +24,8 @@ jobs:
1824
steps:
1925
- uses: actions/checkout@v3
2026
- uses: ./.github/workflows/actions/build-core
27+
with:
28+
ionicons-version: ${{ inputs.ionicons_npm_release_tag }}
2129

2230
test-core-clean-build:
2331
needs: [build-core]

0 commit comments

Comments
 (0)