Skip to content

Commit

Permalink
chore: rename amplify-api-next refs to amplify-data (#416)
Browse files Browse the repository at this point in the history
  • Loading branch information
iartemiev authored Dec 18, 2024
1 parent 8d51378 commit 8f8a6b6
Show file tree
Hide file tree
Showing 29 changed files with 92 additions and 87 deletions.
2 changes: 2 additions & 0 deletions .changeset/six-zoos-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Load Verdaccio with amplify-api-next
description: Turn on Verdaccio and load up all of the amplify-api-next build artifacts
name: Load Verdaccio with amplify-data
description: Turn on Verdaccio and load up all of the amplify-data build artifacts

runs:
using: 'composite'
Expand All @@ -16,7 +16,7 @@ runs:
# Run your commands after verdaccio is up and running
echo "Verdaccio is up and running, proceeding with the script..."
shell: bash
working-directory: ./amplify-api-next
working-directory: ./amplify-data
- name: Upload artifact
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 https://github.com/actions/upload-artifact/commit/0b7f8abb1508181956e8e162db84b466c27e18ce
if: failure()
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/node-and-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ runs:
if: inputs.force == 'true'
run: npm i --force
shell: bash
working-directory: ./amplify-api-next
working-directory: ./amplify-data
# TODO We should be able to skip yarn / bootstrap if we cache enough things. Leaving because skipping causes issues.
- name: Install
if: inputs.force != 'true' && (inputs.is-prebuild != 'true' || steps.cache-build-artifacts.outputs.cache-hit != 'true')
run: npm i
shell: bash
working-directory: ./amplify-api-next
working-directory: ./amplify-data
- name: Build packages
if: steps.cache-build-artifacts.outputs.cache-hit != 'true'
run: npm run build
shell: bash
working-directory: ./amplify-api-next
working-directory: ./amplify-data
2 changes: 1 addition & 1 deletion .github/actions/npm-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ runs:
- name: Run npm publish
if: github.repository_owner == 'aws-amplify'
shell: bash
working-directory: ./amplify-api-next
working-directory: ./amplify-data
env:
NPM_TOKEN: ${{ inputs.npm_token }}
GH_SHA: ${{ github.sha }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-samples-staging/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runs:
token: ${{ inputs.AMPLIFY_JS_SAMPLES_STAGING_READ }}

# We test on the staging branch that corresponds to the current
# `amplify-api-next` branch (when it exists), and otherwise test on the
# `amplify-data` branch (when it exists), and otherwise test on the
# default branch (`main`)
- name: Staging repo branch selection
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/callable-check-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
with:
path: amplify-api-next
path: amplify-data
- name: Setup node and build the repository
uses: ./amplify-api-next/.github/actions/node-and-build
uses: ./amplify-data/.github/actions/node-and-build
- name: Run checks
working-directory: ./amplify-api-next
working-directory: ./amplify-data
run: npm run check:api
- name: API Check Instructions
if: failure()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/callable-check-changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
with:
path:
amplify-api-next
amplify-data
# check out full history
fetch-depth: 0
- name: Setup node and build the repository
uses: ./amplify-api-next/.github/actions/node-and-build
uses: ./amplify-data/.github/actions/node-and-build
- name: Run checks
working-directory: ./amplify-api-next
working-directory: ./amplify-data
run: npx changeset status --since origin/main
- name: API Check Instructions
if: failure()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/callable-check-package-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
with:
path: amplify-api-next
path: amplify-data
- name: Setup node and build the repository
uses: ./amplify-api-next/.github/actions/node-and-build
uses: ./amplify-data/.github/actions/node-and-build
- name: Run checks
working-directory: ./amplify-api-next
working-directory: ./amplify-data
run: npm run check:package-lock
- name: API Check Instructions
if: failure()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/callable-check-type-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
with:
path: amplify-api-next
path: amplify-data
- name: Setup node and build the repository
uses: ./amplify-api-next/.github/actions/node-and-build
uses: ./amplify-data/.github/actions/node-and-build
- name: Run checks
working-directory: ./amplify-api-next
working-directory: ./amplify-data
run: npm run check:type-perf
- name: Type Perf Check Instructions
if: failure()
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/callable-e2e-test-detox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ jobs:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: amplify-api-next
path: amplify-data
- name: Setup node and build the repository
uses: ./amplify-api-next/.github/actions/node-and-build
uses: ./amplify-data/.github/actions/node-and-build
- name: Setup samples staging repository
uses: ./amplify-api-next/.github/actions/setup-samples-staging
uses: ./amplify-data/.github/actions/setup-samples-staging
with:
AMPLIFY_JS_SAMPLES_STAGING_READ: ${{ secrets.AMPLIFY_JS_SAMPLES_STAGING_READ }}
- name: Load Verdaccio with amplify-api-next
uses: ./amplify-api-next/.github/actions/load-verdaccio-with-amplify-api-next
- name: Load Verdaccio with amplify-data
uses: ./amplify-data/.github/actions/load-verdaccio-with-amplify-data
- name: Yarn Install
working-directory: ${{ inputs.working_directory }}
run: |
echo "Current NPM registry: " $(yarn config get registry)
$GITHUB_WORKSPACE/amplify-api-next/scripts/retry-yarn-script.sh -s 'install --frozen-lockfile --non-interactive' -n 3
$GITHUB_WORKSPACE/amplify-data/scripts/retry-yarn-script.sh -s 'install --frozen-lockfile --non-interactive' -n 3
shell: bash
- name: Install CocoaPods
run: |
Expand Down Expand Up @@ -72,6 +72,6 @@ jobs:
shell: bash
- name: Detox run
run: |
$GITHUB_WORKSPACE/amplify-api-next/scripts/retry-yarn-script.sh -s 'detox test -c ios.sim.debug -u' -n 3
$GITHUB_WORKSPACE/amplify-data/scripts/retry-yarn-script.sh -s 'detox test -c ios.sim.debug -u' -n 3
working-directory: ${{ inputs.working_directory }}
shell: bash
14 changes: 7 additions & 7 deletions .github/workflows/callable-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ on:
required: false
type: string
env:
AMPLIFY_DIR: /home/runner/work/amplify-api-next/amplify-api-next/amplify-api-next
AMPLIFY_DIR: /home/runner/work/amplify-data/amplify-data/amplify-data

jobs:
e2e-test:
Expand All @@ -57,15 +57,15 @@ jobs:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: amplify-api-next
path: amplify-data
- name: Setup node and build the repository
uses: ./amplify-api-next/.github/actions/node-and-build
uses: ./amplify-data/.github/actions/node-and-build
- name: Setup samples staging repository
uses: ./amplify-api-next/.github/actions/setup-samples-staging
uses: ./amplify-data/.github/actions/setup-samples-staging
with:
AMPLIFY_JS_SAMPLES_STAGING_READ: ${{ secrets.AMPLIFY_JS_SAMPLES_STAGING_READ }}
- name: Load Verdaccio with AmplifyApiNext
uses: ./amplify-api-next/.github/actions/load-verdaccio-with-amplify-api-next
uses: ./amplify-data/.github/actions/load-verdaccio-with-amplify-data
- name: Run cypress tests for ${{ inputs.test_name }} dev
shell: bash
working-directory: amplify-js-samples-staging
Expand All @@ -82,7 +82,7 @@ jobs:
E2E_YARN_SCRIPT: ${{ inputs.yarn_script }}
run: |
if [ -z "$E2E_YARN_SCRIPT" ]; then
../amplify-api-next/scripts/retry-yarn-script.sh -s \
../amplify-data/scripts/retry-yarn-script.sh -s \
"ci:test \
$E2E_FRAMEWORK \
$E2E_CATEGORY \
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
E2E_YARN_SCRIPT: ${{ inputs.yarn_script }}
run: |
if [ -z "$E2E_YARN_SCRIPT" ]; then
../amplify-api-next/scripts/retry-yarn-script.sh -s \
../amplify-data/scripts/retry-yarn-script.sh -s \
"ci:test \
$E2E_FRAMEWORK \
$E2E_CATEGORY \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/callable-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: amplify-api-next
path: amplify-data
- name: Read integ config files
id: load_config
run: |
echo "INTEG_CONFIG=$(cat .github/integ-config/integ-all.yml | yq '.tests' -o=json | jq -c .)" >> $GITHUB_OUTPUT
echo "DETOX_INTEG_CONFIG=$(cat .github/integ-config/detox-integ-all.yml | yq -o=json | jq -c .)" >> $GITHUB_OUTPUT
working-directory: ./amplify-api-next
working-directory: ./amplify-data
outputs:
integ-config: ${{ steps.load_config.outputs.INTEG_CONFIG }}
detox-integ-config: ${{ steps.load_config.outputs.DETOX_INTEG_CONFIG }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/callable-local-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ jobs:
- name: Checkout repository
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
with:
path: amplify-api-next
path: amplify-data
- name: Setup node and build the repository
uses: ./amplify-api-next/.github/actions/node-and-build
uses: ./amplify-data/.github/actions/node-and-build
- name: Write Amplify outputs
working-directory: ./amplify-api-next
working-directory: ./amplify-data
env:
AMPLIFY_OUTPUTS_BASE64: ${{ secrets.E2E_NODE_AMPLIFY_OUTPUTS_BASE64 }}
run: |
echo $AMPLIFY_OUTPUTS_BASE64 | base64 --decode > ./packages/e2e-tests/node/amplify_outputs.json
- name: Install Node Sample Dependencies
working-directory: ./amplify-api-next
working-directory: ./amplify-data
run: npm run e2e-node:install
- name: Run tests
working-directory: ./amplify-api-next
working-directory: ./amplify-data
run: npm run e2e-node:test
6 changes: 3 additions & 3 deletions .github/workflows/callable-npm-publish-preid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
with:
path: amplify-api-next
path: amplify-data
token: ${{ secrets.GH_TOKEN_AMPLIFY_WRITE }}

- name: Setup node and build the repository
uses: ./amplify-api-next/.github/actions/node-and-build
uses: ./amplify-data/.github/actions/node-and-build

- name: Run npm publish
uses: ./amplify-api-next/.github/actions/npm-publish
uses: ./amplify-data/.github/actions/npm-publish
with:
target: preid
preid: ${{ inputs.preid }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/callable-npm-publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
with:
path: amplify-api-next
path: amplify-data
token: ${{ secrets.GH_TOKEN_AMPLIFY_WRITE }}

- name: Setup node and build the repository
uses: ./amplify-api-next/.github/actions/node-and-build
uses: ./amplify-data/.github/actions/node-and-build

- name: Run npm publish
uses: ./amplify-api-next/.github/actions/npm-publish
uses: ./amplify-data/.github/actions/npm-publish
with:
target: release
npm_token: ${{ secrets.NPM_TOKEN }}
Expand All @@ -33,11 +33,11 @@ jobs:
git config --global user.name $GITHUB_USER
- name: Update lockfile with newly published version
working-directory: ./amplify-api-next
working-directory: ./amplify-data
run: npm i

- name: Commit version and changelog
working-directory: ./amplify-api-next
working-directory: ./amplify-data
run: |
git add .
git commit -m "release: publish [ci skip]"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Prebuild amplify-api-next
name: Prebuild amplify-data

on:
workflow_call:
Expand All @@ -15,8 +15,8 @@ jobs:
- name: Checkout repository
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
with:
path: amplify-api-next
path: amplify-data
- name: Setup node and build the repository
uses: ./amplify-api-next/.github/actions/node-and-build
uses: ./amplify-data/.github/actions/node-and-build
with:
is-prebuild: true
4 changes: 2 additions & 2 deletions .github/workflows/callable-prebuild-samples-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: amplify-api-next
path: amplify-data
- name: Setup samples staging
uses: ./amplify-api-next/.github/actions/setup-samples-staging
uses: ./amplify-data/.github/actions/setup-samples-staging
with:
AMPLIFY_JS_SAMPLES_STAGING_READ: ${{ secrets.AMPLIFY_JS_SAMPLES_STAGING_READ }}
2 changes: 1 addition & 1 deletion .github/workflows/callable-release-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: workflow_call

jobs:
prebuild-ubuntu:
uses: ./.github/workflows/callable-prebuild-amplify-api-next.yml
uses: ./.github/workflows/callable-prebuild-amplify-data.yml
with:
runs_on: ubuntu-latest
prebuild-samples-staging:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/callable-ts-version-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ jobs:
- name: Checkout repository
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
with:
path: amplify-api-next
path: amplify-data
- name: Install specific typescript version
env:
VERSION: ${{ inputs.tsVersion }}
working-directory: ./amplify-api-next
working-directory: ./amplify-data
run: npm i typescript@$VERSION
- name: Setup node and build the repository
uses: ./amplify-api-next/.github/actions/node-and-build
uses: ./amplify-data/.github/actions/node-and-build
with:
force: true
- name: Run tests
working-directory: ./amplify-api-next
working-directory: ./amplify-data
run: npm run lint && npm run test
6 changes: 3 additions & 3 deletions .github/workflows/callable-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
with:
path: amplify-api-next
path: amplify-data
- name: Setup node and build the repository
uses: ./amplify-api-next/.github/actions/node-and-build
uses: ./amplify-data/.github/actions/node-and-build
- name: Run tests
working-directory: ./amplify-api-next
working-directory: ./amplify-data
run: npm run lint && npm run test
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
with:
path: amplify-api-next
path: amplify-data
- name: Setup node and build the repository
uses: ./amplify-api-next/.github/actions/node-and-build
uses: ./amplify-data/.github/actions/node-and-build
with:
is-prebuild: true
check-dependencies:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/prepare-revert-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
with:
path: amplify-api-next
path: amplify-data
token: ${{ secrets.GITHUB_TOKEN }}
# fetch full history so that we can properly lookup past releases
fetch-depth: 0
- name: Setup node and build the repository
uses: ./amplify-api-next/.github/actions/node-and-build
uses: ./amplify-data/.github/actions/node-and-build
with:
is-prebuild: true
- name: Generate Revert PR
working-directory: ./amplify-api-next
working-directory: ./amplify-data
run: npx tsx ./scripts/prepare-revert-pr.ts
Loading

0 comments on commit 8f8a6b6

Please sign in to comment.