Skip to content

Commit

Permalink
chore(): sync with main for GitHub Actions
Browse files Browse the repository at this point in the history
chore(): sync with main for GitHub Actions
  • Loading branch information
liamdebeasi authored Nov 2, 2021
2 parents 27aef93 + 2ce8011 commit ff25ac1
Show file tree
Hide file tree
Showing 49 changed files with 14,508 additions and 18,285 deletions.
585 changes: 0 additions & 585 deletions .circleci/config.yml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ Thanks for your interest in contributing to the Ionic Framework! :tada:
+ [Modifying Tests](#modifying-tests)
- [Screenshot Tests](#screenshot-tests)
+ [Building Changes](#building-changes)
* [Angular, React, and Vue](#angular-react-and-vue)
+ [Modifying Files](#modifying-files)
+ [Preview Changes](#preview-changes-1)
+ [Lint Changes](#lint-changes-1)
+ [Modifying Tests](#modifying-tests-1)
+ [Building Changes](#building-changes-1)
* [Submit Pull Request](#submit-pull-request)
- [Commit Message Guidelines](#commit-message-guidelines)
* [Commit Message Format](#commit-message-format)
Expand Down Expand Up @@ -160,6 +166,56 @@ Without a reliable code reproduction, it is unlikely we will be able to resolve
3. Make sure the build has finished before committing. If you made changes to the documentation, properties, methods, or anything else that requires an update to a generate file, this needs to be committed.
4. After the changes have been pushed, publish the branch and [create a pull request](#creating-a-pull-request).

### Angular, React, and Vue

#### Modifying Files

1. Locate the files inside the relevant root directory:
- Angular: `/angular/src`
- React: `/packages/react/src`
- Vue: `/packages/vue/src`
2. Make your changes to the files. If the change is overly complex or out of the ordinary, add comments so we can understand the changes.
3. Run lint on the directory and make sure there are no errors.
4. Build the project.
5. After the build is finished, commit the changes. Please follow the [commit message format](#commit-message-format) for every commit.
6. [Submit a Pull Request](#submit-pull-request) of your changes.



#### Preview Changes

1. Run `npm run start` inside of the relevant test app directory. This will sync your previously built changes into a test Ionic app:
- Angular: `/angular/test-app`
- React: `/packages/react/test-app`
- Vue: `/packages/vue/test-app`
2. In a browser, navigate to the page you wish to test.
3. Alternatively, create a new page if you need to test something that is not already there.


#### Lint Changes

1. Run `npm run lint` to lint the TypeScript in the relevant directory:
- Angular: `/angular/src`
- React: `/packages/react/src`
- Vue: `/packages/vue/src`
2. If there are lint errors, run `npm run lint.fix` to automatically fix any errors. Repeat step 1 to ensure the errors have been fixed, and manually fix them if not.

#### Modifying Tests

1. Locate the test to modify inside the relevant test app directory:
- Angular: `/angular/test-app/e2e/src`
- React: `/packages/react/test-app/cypress/integration`
- Vue: `/packages/vue/test-app/tests/e2e`
2. If a test exists, modify the test by adding an example to reproduce the problem fixed or feature added.
3. If a new test is needed, copy an existing test, rename it, and edit the content in the test file.
4. Run `npm run test` to run your tests.

#### Building Changes

1. Once all changes have been made, run `npm run build` inside of the root directory. This will add your changes to any auto-generated files, if necessary.
2. Review the changes and, if everything looks correct, [commit](#commit-message-format) the changes.
3. Make sure the build has finished before committing. If you made changes to the documentation, properties, methods, or anything else that requires an update to a generate file, this needs to be committed.
4. After the changes have been pushed, publish the branch and [create a pull request](#creating-a-pull-request).

### Submit Pull Request

Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/actions/build-angular-server/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Build Ionic Angular Server'
description: 'Build Ionic Angular Server'
runs:
using: 'composite'
steps:
- uses: actions/setup-node@v1
with:
node-version: 15.x

- name: Install Angular Server Dependencies
run: npm install --legacy-peer-deps
shell: bash
working-directory: ./packages/angular-server
- name: Build
run: npm run build.prod
shell: bash
working-directory: ./packages/angular-server
- uses: ./.github/workflows/actions/upload-archive
with:
name: ionic-angular-server
output: packages/angular-server/AngularServerBuild.zip
paths: packages/angular-server/dist
53 changes: 53 additions & 0 deletions .github/workflows/actions/build-angular/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: 'Build Ionic Angular'
description: 'Build Ionic Angular'
runs:
using: 'composite'
steps:
- uses: actions/setup-node@v1
with:
node-version: 15.x

- name: Cache Core Node Modules
uses: actions/cache@v2
env:
cache-name: core-node-modules
with:
path: ./core/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json')}}-v2
- name: Cache Angular Node Modules
uses: actions/cache@v2
env:
cache-name: angular-node-modules
with:
path: ./angular/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./angular/package-lock.json')}}-v2
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core
path: ./core
filename: CoreBuild.zip
- name: Install Angular Dependencies
run: npm install
shell: bash
working-directory: ./angular
- name: Link @ionic/core
run: npm link
shell: bash
working-directory: ./core
- name: Link @ionic/core in @ionic/angular
run: npm link @ionic/core
shell: bash
working-directory: ./angular
- name: Lint
run: npm run lint
shell: bash
working-directory: ./angular
- name: Build
run: npm run build
shell: bash
working-directory: ./angular
- uses: ./.github/workflows/actions/upload-archive
with:
name: ionic-angular
output: ./angular/AngularBuild.zip
paths: ./angular/dist
30 changes: 30 additions & 0 deletions .github/workflows/actions/build-core/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 'Build Ionic Core'
description: 'Build Ionic Core'
runs:
using: 'composite'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 15.x

- name: Cache Node Modules
uses: actions/cache@v2
env:
cache-name: core-node-modules
with:
path: ./core/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v2
- name: Install Dependencies
run: npm install
working-directory: ./core
shell: bash
- name: Build Core
run: npm run build -- --ci
working-directory: ./core
shell: bash
- uses: ./.github/workflows/actions/upload-archive
with:
name: ionic-core
output: core/CoreBuild.zip
paths: core/dist core/components core/css core/hydrate core/loader
47 changes: 47 additions & 0 deletions .github/workflows/actions/build-react-router/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 'Build Ionic React Router'
description: 'Build Ionic React Router'
runs:
using: 'composite'
steps:
- uses: actions/setup-node@v1
with:
node-version: 15.x

- name: Cache Core Node Modules
uses: actions/cache@v2
env:
cache-name: core-node-modules
with:
path: ./core/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v2
- name: Install Dependencies
run: npm install --legacy-peer-deps
shell: bash
working-directory: ./packages/react-router
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-react
path: ./packages/react
filename: ReactBuild.zip
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core
path: ./core
filename: CoreBuild.zip
- name: Sync
run: npm run sync
shell: bash
working-directory: ./packages/react-router
- name: Lint
run: npm run lint
shell: bash
working-directory: ./packages/react-router
- name: Build
run: npm run build
shell: bash
working-directory: ./packages/react-router
- uses: ./.github/workflows/actions/upload-archive
with:
name: ionic-react-router
output: packages/react-router/ReactRouterBuild.zip
paths: packages/react-router/dist
46 changes: 46 additions & 0 deletions .github/workflows/actions/build-react/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: 'Build Ionic React'
description: 'Build Ionic React'
runs:
using: 'composite'
steps:
- uses: actions/setup-node@v1
with:
node-version: 15.x

- name: Cache Core Node Modules
uses: actions/cache@v2
env:
cache-name: core-node-modules
with:
path: ./core/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v2
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core
path: ./core
filename: CoreBuild.zip
- name: Install React Dependencies
run: npm install --legacy-peer-deps
shell: bash
working-directory: ./packages/react
- name: Sync
run: npm run sync
shell: bash
working-directory: ./packages/react
- name: Lint
run: npm run lint
shell: bash
working-directory: ./packages/react
- name: Build
run: npm run build
shell: bash
working-directory: ./packages/react
- name: Test Spec
run: npm run test.spec
shell: bash
working-directory: ./packages/react
- uses: ./.github/workflows/actions/upload-archive
with:
name: ionic-react
output: packages/react/ReactBuild.zip
paths: packages/react/dist packages/react/css
51 changes: 51 additions & 0 deletions .github/workflows/actions/build-vue-router/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: 'Build Ionic Vue Router'
description: 'Builds Ionic Vue Router'
runs:
using: 'composite'
steps:
- uses: actions/setup-node@v1
with:
node-version: 15.x

- name: Cache Core Node Modules
uses: actions/cache@v2
env:
cache-name: core-node-modules
with:
path: ./core/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v2
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core
path: ./core
filename: CoreBuild.zip
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-vue
path: ./packages/vue
filename: VueBuild.zip
- name: Install Vue Router Dependencies
run: npm install
shell: bash
working-directory: ./packages/vue-router
- name: Sync
run: npm run sync
shell: bash
working-directory: ./packages/vue-router
- name: Lint
run: npm run lint
shell: bash
working-directory: ./packages/vue-router
- name: Build
run: npm run build
shell: bash
working-directory: ./packages/vue-router
- name: Test Spec
run: npm run test.spec
shell: bash
working-directory: ./packages/vue-router
- uses: ./.github/workflows/actions/upload-archive
with:
name: ionic-vue-router
output: ./packages/vue-router/VueRouterBuild.zip
paths: packages/vue-router/dist
42 changes: 42 additions & 0 deletions .github/workflows/actions/build-vue/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: 'Build Ionic Vue'
description: 'Build Ionic Vue'
runs:
using: 'composite'
steps:
- uses: actions/setup-node@v1
with:
node-version: 15.x

- name: Cache Core Node Modules
uses: actions/cache@v2
env:
cache-name: core-node-modules
with:
path: ./core/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./core/package-lock.json') }}-v2
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core
path: ./core
filename: CoreBuild.zip
- name: Install Vue Dependencies
run: npm install
shell: bash
working-directory: ./packages/vue
- name: Sync
run: npm run sync
shell: bash
working-directory: ./packages/vue
- name: Lint
run: npm run lint
shell: bash
working-directory: ./packages/vue
- name: Build
run: npm run build
shell: bash
working-directory: ./packages/vue
- uses: ./.github/workflows/actions/upload-archive
with:
name: ionic-vue
output: packages/vue/VueBuild.zip
paths: packages/vue/dist packages/vue/css
19 changes: 19 additions & 0 deletions .github/workflows/actions/download-archive/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Ionic Framework Archive Download'
description: 'Downloads and decompresses an archive from a previous job'
inputs:
path:
description: 'Input archive name'
filename:
description: 'Input file name'
name:
description: 'Archive name'
runs:
using: 'composite'
steps:
- uses: actions/download-artifact@v2
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
- name: Exract Archive
run: unzip -q -o ${{ inputs.path }}/${{ inputs.filename }}
shell: bash
Loading

0 comments on commit ff25ac1

Please sign in to comment.