Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Migrate CI/CD to GitHub Actions #11638

Merged
merged 72 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
ab5e78b
feat: Actions for pr testing (#12)
stocaaro Jun 23, 2023
f7d9ec3
feat: Add working e2e example (#14)
stocaaro Jun 30, 2023
61644bc
chore: Add configurable e2e tests to GH workflows (#15)
ashwinkumar6 Jun 30, 2023
92bdee6
chore: add e2e browser auth tests (#16)
ashwinkumar6 Jul 3, 2023
b19ed2c
chore: add e2e browser predictions interactions tests (#17)
ashwinkumar6 Jul 3, 2023
b6eeb59
chore: limit PR concurrency (#19)
yingku Jul 3, 2023
d0e8138
chore: add build_type and enable retry (#18)
yingku Jul 3, 2023
169bc74
chore: add e2e browser datastore tests (#20)
ashwinkumar6 Jul 3, 2023
7a69289
chore: add e2e browser api,storage tests (#21)
ashwinkumar6 Jul 3, 2023
6f43686
chore: fix single browser provided in integ-config (#22)
ashwinkumar6 Jul 3, 2023
989f46c
chore: Run dev and prod on the same runner
stocaaro Jul 3, 2023
b928733
chore: Add detox testing (#26)
stocaaro Jul 5, 2023
1e163bc
Feat/GitHub actions/test ashwinkumar6 (#27)
ashwinkumar6 Jul 5, 2023
4b57b93
chore: Re-arrange integ test configurations and improve prebuild (#29)
stocaaro Jul 6, 2023
6d6a591
feat: Change yaml load output pattern
stocaaro Jul 6, 2023
117e695
chore: fix e2e integ_datastore_auth_v2 test
Jul 7, 2023
27f35f4
chore: fix e2e integ_datastore_auth_v2 test
ashwinkumar6 Jul 7, 2023
d35d591
chore: disable playwright tests (#33)
ashwinkumar6 Jul 10, 2023
0d6c67d
chore: add google env variables for e2e datastore tests (#35)
ashwinkumar6 Jul 10, 2023
9d5dd1a
chore: add support for uploading artifacts (#34)
yingku Jul 10, 2023
a7c195c
chore: Detox fix and step cleanup
stocaaro Jul 10, 2023
6ead186
chore: Increase detox time limit
stocaaro Jul 10, 2023
cd9002d
chore: Turn warn to ignore for upload artifact misses
stocaaro Jul 10, 2023
414e0d0
chore: Disable broken detox tests
stocaaro Jul 11, 2023
86e0e0c
chore: Disable PN testing and remove datastore test not running in ci…
stocaaro Jul 11, 2023
e45e9c4
chore: e2e add configurable time_out and retry_count (#36)
ashwinkumar6 Jul 11, 2023
842521b
chore: Increase deviceTracking timeout
stocaaro Jul 12, 2023
6baa2e3
chore: add deploy workflow (#37)
ashwinkumar6 Jul 12, 2023
2d98e13
chore: Model full CI/CD flow - improve preid release (#38)
stocaaro Jul 13, 2023
90fcc46
fix: Cache on the single yarn.lock instead of all
stocaaro Jul 14, 2023
ed07888
fix: Sync with main
stocaaro Jul 14, 2023
3a99fec
chore: Revert to relative path use (#40)
stocaaro Jul 14, 2023
919c9b3
chore: Add post-release merge to main
stocaaro Jul 17, 2023
6897457
chore: Remove orphaned workflow files
stocaaro Jul 17, 2023
39bcfd9
chore: Add post-release merge to main
stocaaro Jul 17, 2023
335046c
chore: e2e add integ_auth_test_cypress_no_ui test (#39)
ashwinkumar6 Jul 17, 2023
025527b
Merge remote-tracking branch 'upstream' into feat/github-actions/main
stocaaro Jul 17, 2023
afb48cd
chore: change github name and email
stocaaro Jul 17, 2023
be8cc41
chore: update yarn.log
stocaaro Jul 17, 2023
6c0aaf3
chore: move additional e2e commented tests (#43)
ashwinkumar6 Jul 18, 2023
e74ee67
chore: e2e keep test_name same as CCI (#45)
ashwinkumar6 Jul 18, 2023
1c404cb
chore: update actions typo
ashwinkumar6 Jul 19, 2023
8d283dc
chore: update actions typo
ashwinkumar6 Jul 19, 2023
ef803d9
chore: cleanup github_email and github_name (#46)
ashwinkumar6 Jul 19, 2023
8c78f73
chore: cleanup load verdaccio action (#47)
ashwinkumar6 Jul 19, 2023
dafcaab
chore: actions code cleanup (#48)
ashwinkumar6 Jul 19, 2023
b1609a5
chore: Remove unused actions and use env vars instead of injection in…
stocaaro Jul 19, 2023
57b1885
chore: add retention period and timeout for cache (#50)
ashwinkumar6 Jul 19, 2023
929495f
chore: Chanke js token name
stocaaro Jul 19, 2023
4af866f
chore: Filter preid content
stocaaro Jul 19, 2023
76a0d96
chore: Move file names around and consume env vars
stocaaro Jul 19, 2023
b692507
fix: Rest bundle size increase
stocaaro Jul 19, 2023
37fe02d
chore: Compactify on syntax
stocaaro Jul 19, 2023
ec1d3dc
chore: dynamically fetch the repo_owner_name (#52)
ashwinkumar6 Jul 19, 2023
f864030
chore: Configure staging to use corresponding branch name
stocaaro Jul 20, 2023
2828f74
chore: Naming and cleanup
stocaaro Jul 20, 2023
c5a8ae2
chore: Naming and dependency workflow improvements
stocaaro Jul 20, 2023
6b7be67
chore: Merge from upstream
stocaaro Jul 20, 2023
2d75bee
chore: Fix vars use for gh user/email
stocaaro Jul 20, 2023
eb525cf
chore: run e2e Rollup + DataStore test on just chrome (#54)
ashwinkumar6 Jul 20, 2023
5ab3d10
chore: Add preid protection (#57)
stocaaro Jul 25, 2023
7e35b38
chore: Only publish to npm from the aws-amplify org
stocaaro Jul 26, 2023
c029625
chore: add concurrency to push workflows (#56)
ashwinkumar6 Jul 26, 2023
0bb9b88
chore: Prepare for merge to main
stocaaro Aug 2, 2023
5a1fede
chore: Merge from upstream
stocaaro Aug 2, 2023
1266c2c
chore: Fix circle build
stocaaro Aug 2, 2023
fb2b529
chore: Okay, this will fix circle!
stocaaro Aug 2, 2023
9412b24
chore: Integrate license checking into pr check
stocaaro Aug 2, 2023
f692d93
chore: Add github action static tests
stocaaro Aug 2, 2023
c374ec1
chore: Fix test command
stocaaro Aug 2, 2023
41330f3
Update .github/actions/npm-publish/action.yml
stocaaro Aug 3, 2023
972c2f3
chore: Fix names and descriptions
stocaaro Aug 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/actions/load-verdaccio-with-amplify-js/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Load Verdaccio with AmplifyJs
description: Turn on Verdaccio and load up all of the AmplifyJS build artifacts

runs:
using: 'composite'
steps:
- name: Start verdaccio
run: |
npx verdaccio@5.25.0 &
while ! nc -z localhost 4873; do
echo "Verdaccio not running yet"
sleep 1
done

# Run your commands after verdaccio is up and running
echo "Verdaccio is up and running, proceeding with the script..."
shell: bash
- name: Install and run npm-cli-login
shell: bash
env:
NPM_REGISTRY: http://localhost:4873/
NPM_USER: verdaccio
NPM_PASS: verdaccio
NPM_EMAIL: verdaccio@amplify.js
run: |
npm i -g npm-cli-adduser
npm-cli-adduser
sleep 1
- name: Configure registry and git
shell: bash
working-directory: ./amplify-js
env:
NPM_REGISTRY: http://localhost:4873/
NPM_USER: verdaccio
NPM_PASS: verdaccio
NPM_EMAIL: verdaccio@amplify.js
run: |
yarn config set registry $NPM_REGISTRY
npm set registry $NPM_REGISTRY
git config --global user.email $NPM_EMAIL
git config --global user.name $NPM_USER
git status
git --no-pager diff
- name: Publish to verdaccio
shell: bash
working-directory: ./amplify-js
run: |
scripts/retry-yarn-script.sh -s publish:verdaccio -n 5 -r true
yarn info aws-amplify@unstable description
npm info aws-amplify@unstable version
48 changes: 48 additions & 0 deletions .github/actions/node-and-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Set Node and Build
description: Checks out Amplify and builds the package
inputs:
is-prebuild:
required: false
default: false
runs:
using: 'composite'
steps:
- name: Setup Node.js 16
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 https://github.com/actions/setup-node/commit/64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version: 16
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
id: cache-build-artifacts
with:
stocaaro marked this conversation as resolved.
Show resolved Hide resolved
path: |
**/node_modules
**/dist
**/lib
**/lib-esm/
**/es/
**/esm/
**/cjs/
**/packages/core/src/Platform/version.ts
key: ${{ runner.os }}-build-artifacts-${{ hashFiles('./amplify-js/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-artifacts-
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
# TODO We should be able to skip yarn / bootstrap if we cache enough things. Leaving because skipping causes issues.
- name: Install
if: inputs.is-prebuild != 'true' || steps.cache-build-artifacts.outputs.cache-hit != 'true'
run: yarn
shell: bash
working-directory: ./amplify-js
- name: Bootstrap
if: inputs.is-prebuild != 'true' || steps.cache-build-artifacts.outputs.cache-hit != 'true'
run: yarn bootstrap
shell: bash
working-directory: ./amplify-js
- name: Build packages
if: steps.cache-build-artifacts.outputs.cache-hit != 'true'
run: yarn build
shell: bash
working-directory: ./amplify-js
54 changes: 54 additions & 0 deletions .github/actions/npm-publish/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Publish to NPM
description: Publish changes from
stocaaro marked this conversation as resolved.
Show resolved Hide resolved

inputs:
github_user:
description: The git user to make commits with
required: true
github_email:
description: The git email to make commits with
required: true
target:
description: The release process target (either release or preid)
required: true
preid:
description: The preid to release to when the target is preid. The preid process will fail if this isn't provided.
required: false
bash_env:
description: The bash_env filename to use to construct and execute PREID content from
required: false
default: .env
npm_token:
description: The npm token the gives the job npm permissions
stocaaro marked this conversation as resolved.
Show resolved Hide resolved
required: true

runs:
using: 'composite'
steps:
- name: Set github commit user
shell: bash
env:
GITHUB_EMAIL: ${{ inputs.github_email }}
GITHUB_USER: ${{ inputs.github_user }}
run: |
git config --global user.email $GITHUB_EMAIL
git config --global user.name $GITHUB_USER

- name: Run npm publish
shell: bash
working-directory: ./amplify-js
env:
NPM_TOKEN: ${{ inputs.npm_token }}
GH_SHA: ${{ github.sha }}
PREID: ${{ inputs.preid || '' }}
BASH_ENV: ${{ inputs.bash_env }}
TARGET: ${{ inputs.target }}
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
touch $BASH_ENV
echo "export PREID_HASH_SUFFIX=$(echo $GH_SHA | cut -c -7 | sed 's/^/\./')" >> $BASH_ENV
echo "export PREID_PREFIX=$PREID" >> $BASH_ENV
source $BASH_ENV
git status
git --no-pager diff
yarn publish:$TARGET
51 changes: 51 additions & 0 deletions .github/actions/setup-samples-staging/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Setup Amplify Samples Staging
stocaaro marked this conversation as resolved.
Show resolved Hide resolved
description: Checks out Amplify Samples Staging and builds the package with caching
stocaaro marked this conversation as resolved.
Show resolved Hide resolved

inputs:
GH_TOKEN_STAGING_READ:
description: The token that grants read access to the sample staging repo
required: true

runs:
using: 'composite'
steps:
- name: Create cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 https://github.com/actions/cache/commit/88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
id: cache-samples-staging-build
with:
key: aws-amplify-js-samples-staging-build-${{ github.sha }}
path: |
./amplify-js-samples-staging/node_modules
/home/runner/.cache/Cypress
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
- name: Checkout staging repo
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
with:
repository: ${{ github.repository_owner }}/amplify-js-samples-staging
path: amplify-js-samples-staging
token: ${{ inputs.GH_TOKEN_STAGING_READ }}

# We test on the staging branch that corresponds to the amplify-js branch
# when it exists and test on the default branch `main` otherwise
- name: Staging repo branch selection
shell: bash
working-directory: ./amplify-js-samples-staging
env:
BRANCH: ${{ github.ref_name }}
run: |
if git ls-remote --exit-code --heads origin $BRANCH >/dev/null 2>&1; then
# Branch exists, checkout and echo success message
git fetch origin $BRANCH
git checkout $BRANCH
echo "Checked out branch: $BRANCH"
else
# Branch doesn't exist, echo error message
echo "Branch '$BRANCH' does not exist"
fi

- name: Install
run: |
yarn
shell: bash
working-directory: ./amplify-js-samples-staging
37 changes: 0 additions & 37 deletions .github/actions/setup-verdaccio-action/action.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/actions/setup-verdaccio-action/config.yaml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/actions/status-check-action/README.md

This file was deleted.

37 changes: 0 additions & 37 deletions .github/actions/status-check-action/action.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/actions/status-check-action/index.js

This file was deleted.

Loading