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

ci: prerelease test infrastructure #1408

Merged
merged 118 commits into from
Jan 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
1a8a491
test: add netlify prerelease deployment
mcansh Jan 5, 2022
695cc41
chore: try workflow...
mcansh Jan 5, 2022
3b42664
chore: add package-lock.json
mcansh Jan 5, 2022
eacc4f4
chore: pass NETLIFY_AUTH_TOKEN to site:create
mcansh Jan 5, 2022
47f5256
chore: try workflow...
mcansh Jan 5, 2022
e0f5be5
chore: NETLIFY_SITE env var isnt working..?
mcansh Jan 5, 2022
4feb7aa
chore: use release ref instead of date
mcansh Jan 5, 2022
eefe569
chore: rename netlify workflow
mcansh Jan 5, 2022
329f932
test: add fly deployment workflow
mcansh Jan 5, 2022
778b890
chore: move FLY_PROJECT_PATH to root env
mcansh Jan 5, 2022
1d1d903
chore: add arc deployment workflow
mcansh Jan 6, 2022
5fe6675
chore: rename arc workflow
mcansh Jan 6, 2022
4a937b2
chore: update workflow
mcansh Jan 6, 2022
474cd32
chore: update app name
mcansh Jan 6, 2022
8782fdb
chore: install arc cli
mcansh Jan 6, 2022
21f6ed0
chore: have arc deploy on prerelease
mcansh Jan 6, 2022
9a16b18
chore: try fly again
mcansh Jan 6, 2022
fc00438
chore: update deploy args
mcansh Jan 6, 2022
9504a5a
chore: update deploy args
mcansh Jan 6, 2022
64d5d9d
chore: update FLY_PROJECT_PATH
mcansh Jan 6, 2022
5e22c35
chore: update FLY_PROJECT_PATH
mcansh Jan 6, 2022
3335dbe
chore: merge env
mcansh Jan 6, 2022
819a612
vercel-prerelease-deployment-test
mcansh Jan 6, 2022
c06ba1b
chore: add token
mcansh Jan 6, 2022
077163d
chore: add token
mcansh Jan 6, 2022
34c470f
chore: update url
mcansh Jan 6, 2022
c38bf69
chore: token isnt inherited from env
mcansh Jan 6, 2022
083b14f
chore: use release ref in name
mcansh Jan 6, 2022
ae7105c
chore: use sha
mcansh Jan 6, 2022
2b84a1a
chore: use sha
mcansh Jan 6, 2022
1b1a1db
chore: update name, update echo
mcansh Jan 6, 2022
5b7f4ac
chore: fix date
mcansh Jan 6, 2022
fba3802
update echo
mcansh Jan 6, 2022
463bc7d
chore: use curl
mcansh Jan 6, 2022
ef2c398
chore: only run on prerelease
mcansh Jan 6, 2022
4edad8c
chore: pass app name to fly deploy
mcansh Jan 6, 2022
168422f
chore: manually install flyctl
mcansh Jan 6, 2022
072c17e
chore: flyctl
mcansh Jan 6, 2022
7d0a92d
chore: run step
mcansh Jan 6, 2022
27278a8
chore: update install location
mcansh Jan 6, 2022
49c1986
chore: update install location
mcansh Jan 6, 2022
96dcf6d
chore: update working directory
mcansh Jan 6, 2022
fc3d6bd
ci: try fly again
mcansh Jan 7, 2022
f709204
ci: verify netflify status code
mcansh Jan 7, 2022
2fc0dcf
ci: run netlify action
mcansh Jan 7, 2022
cc63c60
ci: get url from create json
mcansh Jan 7, 2022
72e6356
ci: update site creation a bit, and add comments
mcansh Jan 7, 2022
15fc1b2
ci: generate name before creating a site
mcansh Jan 7, 2022
8a4ddc3
ci: explictly ask for bash
mcansh Jan 7, 2022
3f6c05c
ci: use node to create and deploy site
mcansh Jan 7, 2022
fb21a5b
ci: move deploy script to netlify deployment test
mcansh Jan 7, 2022
d412719
ci: pass NETLIFY_AUTH_TOKEN to script
mcansh Jan 7, 2022
6ac9dfa
ci: update vercel prerelease deployment test
mcansh Jan 7, 2022
164a527
ci: test vercel
mcansh Jan 7, 2022
d843433
ci: use correct dir
mcansh Jan 7, 2022
146c686
ci: remove log
mcansh Jan 7, 2022
beeb040
chore: use node 16 for all
mcansh Jan 10, 2022
3c197f5
chore: use sha
mcansh Jan 10, 2022
2247038
chore: disable autLaunch in netlify prerelease test
mcansh Jan 10, 2022
37d52ed
test: add cypress dev test
mcansh Jan 10, 2022
b520c81
chore: test full workflow
mcansh Jan 10, 2022
6bef2f8
Revert "chore: test full workflow"
mcansh Jan 10, 2022
2b6f53b
chore: add cypress smoke test to vercel and arc deployment tests
mcansh Jan 10, 2022
f6eefcf
chore: remove videos
mcansh Jan 10, 2022
14c3b8b
ci: add status code check for arc
mcansh Jan 11, 2022
441250a
ci: run cypress on production url
mcansh Jan 11, 2022
6dc7ce2
ci: remove fly remix-prerelease-deployment-test
mcansh Jan 11, 2022
bb2e329
chore: remove examples/{target}-prerelease-deployment-test
mcansh Jan 11, 2022
ec9e02d
chore(create-remix): move app creation to own module
mcansh Jan 11, 2022
ea2d1b6
ci: create new arc app when workflow runs
mcansh Jan 11, 2022
3d713bb
ci: pin cypress to 9.2.1
mcansh Jan 12, 2022
8582938
ci: run a build until create-remix has a separate module
mcansh Jan 12, 2022
6988c34
ci: make deployment-test dir
mcansh Jan 12, 2022
7f6047b
ci: add arc as devDependency
mcansh Jan 12, 2022
171f4fa
ci: concurrently
mcansh Jan 12, 2022
a4ee876
ci: create new aws app
mcansh Jan 12, 2022
e23474d
ci: update aws stack name generation
mcansh Jan 12, 2022
2e08760
ci: update aws stack name generation
mcansh Jan 12, 2022
bd3214e
ci: remove date from names
mcansh Jan 12, 2022
56b2b7d
ci: check exit codes
mcansh Jan 12, 2022
6ebfc18
ci: update CYPRESS_BASE_URL
mcansh Jan 12, 2022
a17d8d1
ci: remove cypress baseUrl
mcansh Jan 12, 2022
1c3ddd4
ci: use npx
mcansh Jan 12, 2022
cabf7b7
ci: create new netlify app
mcansh Jan 12, 2022
143f4f2
ci: vercel
mcansh Jan 12, 2022
f2c22f0
ci: use vercel api to get deployment url
mcansh Jan 12, 2022
fea0d51
ci: log vercel args
mcansh Jan 12, 2022
6e75c4a
check exit code
mcansh Jan 12, 2022
9e53d0c
ci: extract cypress
mcansh Jan 12, 2022
e937606
ci: extract some cypress set up
mcansh Jan 12, 2022
ce4dce0
ci: add port
mcansh Jan 12, 2022
545768d
ci: install latest version of npm
mcansh Jan 12, 2022
2882ba1
ci: only run on prerelease events
mcansh Jan 12, 2022
2eeaed9
ci: pass url to addCypress
mcansh Jan 12, 2022
9020bb3
ci: create fly apps
mcansh Jan 13, 2022
547fd31
ci: add PORT to fly.toml
mcansh Jan 13, 2022
84bbbac
ci: use flyctl
mcansh Jan 13, 2022
eb12c96
ci: update fly install location
mcansh Jan 13, 2022
30c8e22
ci: log fly app url
mcansh Jan 13, 2022
006fedc
ci: only run on prerelease events
mcansh Jan 13, 2022
e2eaddc
ci: deploy cloudflare workers
mcansh Jan 13, 2022
680400c
chore(create-remix): add cloudflare-pages to Server type
mcansh Jan 13, 2022
4f06ab3
ci: worker updates
mcansh Jan 14, 2022
dac7dbd
ci: wrangler publish
mcansh Jan 14, 2022
500f36c
ci: fix api token
mcansh Jan 14, 2022
0945ab2
ci: use node 16 for cf workers
mcansh Jan 14, 2022
81eb81d
ci: only run on prerelease events
mcansh Jan 14, 2022
757c799
ci: deploy to cf pages
mcansh Jan 14, 2022
c237d47
ci: configure git
mcansh Jan 14, 2022
07db1ce
ci: configure git after initializing repo
mcansh Jan 14, 2022
2e71c95
ci: configure git after initializing repo
mcansh Jan 14, 2022
8a4fc69
ci: use main branch
mcansh Jan 14, 2022
e1de2fc
ci: use main branch
mcansh Jan 14, 2022
98cf87f
ci: oops
mcansh Jan 14, 2022
24e3df1
ci: update sleep log
mcansh Jan 14, 2022
8de1e6f
ci: give cypress a url
mcansh Jan 14, 2022
8fdb6ba
ci: only run on prerelease events
mcansh Jan 14, 2022
e1375dc
ci(fly): remove unneeded dockerfile
mcansh Jan 14, 2022
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
49 changes: 49 additions & 0 deletions .github/workflows/arc-prerelease-deployment.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: arc prerelease deployment test

on:
release:
types: [prereleased]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2

- run: echo "::set-output name=version::$(cat .nvmrc)"
id: nvmrc

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: "${{ steps.nvmrc.outputs.version }}"

- run: echo "::set-output name=dir::$(yarn cache dir)"
id: yarn-cache

- name: Restore dependency cache
uses: actions/cache@v2
with:
path: "${{ steps.yarn-cache.outputs.dir }}"
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-cache-

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Build
run: yarn build

- run: mkdir -p deployment-test

- name: Install latest version of npm
run: npm install -g npm@latest

- name: Deploy to Arc
run: node ./scripts/deployment-test/arc.mjs
env:
CI: true
AWS_ACCESS_KEY_ID: ${{ secrets.TEST_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY }}
48 changes: 48 additions & 0 deletions .github/workflows/cf-pages-prerelease-deployment.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: cloudflare pages prerelease deployment test

on:
release:
types: [prereleased]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2

- name: Setup node
uses: actions/setup-node@v1
with:
# Miniflare requires at least Node.js 16.7.0.
node-version: 16

- run: echo "::set-output name=dir::$(yarn cache dir)"
id: yarn-cache

- name: Restore dependency cache
uses: actions/cache@v2
with:
path: "${{ steps.yarn-cache.outputs.dir }}"
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-cache-

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Build
run: yarn build

- run: mkdir -p deployment-test

- name: Install latest version of npm
run: npm install -g npm@latest

- name: Deploy to Cloudflare Pages
run: node ./scripts/deployment-test/cf-pages.mjs
env:
CF_ACCOUNT_ID: ${{ secrets.TEST_CF_ACCOUNT_ID }}
CF_GLOBAL_API_KEY: ${{ secrets.TEST_CF_GLOBAL_API_KEY }}
CF_EMAIL: ${{ secrets.TEST_CF_EMAIL }}
GITHUB_TOKEN: ${{ secrets.TEST_CF_GITHUB_TOKEN }}
49 changes: 49 additions & 0 deletions .github/workflows/cf-workers-prerelease-deployment.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: cloudflare workers prerelease deployment test

on:
release:
types: [prereleased]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2

- name: Setup node
uses: actions/setup-node@v1
with:
# Miniflare requires at least Node.js 16.7.0.
node-version: 16

- run: echo "::set-output name=dir::$(yarn cache dir)"
id: yarn-cache

- name: Restore dependency cache
uses: actions/cache@v2
with:
path: "${{ steps.yarn-cache.outputs.dir }}"
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-cache-

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Build
run: yarn build

- run: mkdir -p deployment-test

- name: Install latest version of npm
run: npm install -g npm@latest

- name: Install Wrangler
run: npm install -g @cloudflare/wrangler

- name: Deploy to Cloudflare Workers
run: node ./scripts/deployment-test/cf-workers.mjs
env:
CF_ACCOUNT_ID: ${{ secrets.TEST_CF_ACCOUNT_ID }}
CF_API_TOKEN: ${{ secrets.TEST_CF_API_TOKEN }}
50 changes: 50 additions & 0 deletions .github/workflows/fly-prerelease-deployment-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: fly prerelease deployment test

on:
release:
types: [prereleased]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2

- run: echo "::set-output name=version::$(cat .nvmrc)"
id: nvmrc

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: "${{ steps.nvmrc.outputs.version }}"

- run: echo "::set-output name=dir::$(yarn cache dir)"
id: yarn-cache

- name: Restore dependency cache
uses: actions/cache@v2
with:
path: "${{ steps.yarn-cache.outputs.dir }}"
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-cache-

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Build
run: yarn build

- run: mkdir -p deployment-test

- name: Install latest version of npm
run: npm install -g npm@latest

- name: Install the Fly CLI
run: curl -L https://fly.io/install.sh | FLYCTL_INSTALL=/usr/local sh

- name: Deploy to Fly
run: node ./scripts/deployment-test/fly.mjs
env:
FLY_API_TOKEN: ${{ secrets.TEST_FLY_TOKEN }}
47 changes: 47 additions & 0 deletions .github/workflows/netlify-prerelease-deployment-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: netlify prerelease deployment test

on:
release:
types: [prereleased]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2

- run: echo "::set-output name=version::$(cat .nvmrc)"
id: nvmrc

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: "${{ steps.nvmrc.outputs.version }}"

- run: echo "::set-output name=dir::$(yarn cache dir)"
id: yarn-cache

- name: Restore dependency cache
uses: actions/cache@v2
with:
path: "${{ steps.yarn-cache.outputs.dir }}"
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-cache-

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Build
run: yarn build

- run: mkdir -p deployment-test

- name: Install latest version of npm
run: npm install -g npm@latest

- name: Deploy to Netlify
run: node ./scripts/deployment-test/netlify.mjs
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.TEST_NETLIFY_TOKEN }}
48 changes: 48 additions & 0 deletions .github/workflows/vercel-prerelease-deployment-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: vercel prerelease deployment test

on:
release:
types: [prereleased]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2

- run: echo "::set-output name=version::$(cat .nvmrc)"
id: nvmrc

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: "${{ steps.nvmrc.outputs.version }}"

- run: echo "::set-output name=dir::$(yarn cache dir)"
id: yarn-cache

- name: Restore dependency cache
uses: actions/cache@v2
with:
path: "${{ steps.yarn-cache.outputs.dir }}"
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-cache-

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Build
run: yarn build

- run: mkdir -p deployment-test

- name: Install latest version of npm
run: npm install -g npm@latest

- name: Deploy to Vercel
run: node ./scripts/deployment-test/vercel.mjs
env:
VERCEL_TOKEN: ${{ secrets.TEST_VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.TEST_VERCEL_USER_ID }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ yarn-error.log
/fixtures/deno-app

.eslintcache

/deployment-test
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,21 @@
"packages/remix-vercel"
],
"dependencies": {
"@architect/parser": "5.0.2",
"@architect/utils": "3.0.4",
"@babel/core": "^7.10.4",
"@babel/eslint-parser": "^7.16.3",
"@babel/plugin-proposal-export-namespace-from": "^7.10.4",
"@babel/plugin-proposal-optional-chaining": "^7.12.7",
"@babel/preset-env": "^7.10.4",
"@babel/preset-react": "^7.16.0",
"@babel/preset-typescript": "^7.12.7",
"@iarna/toml": "2.2.5",
"@octokit/rest": "18.12.0",
"@rollup/plugin-babel": "^5.2.2",
"@rollup/plugin-node-resolve": "^11.0.1",
"@rushstack/eslint-patch": "^1.1.0",
"@testing-library/cypress": "^8.0.2",
"@types/cheerio": "^0.22.22",
"@types/jest": "^25.2.3",
"@types/node-fetch": "^2.5.7",
Expand All @@ -56,8 +61,11 @@
"@typescript-eslint/parser": "^5.6.0",
"abort-controller": "^3.0.0",
"abortcontroller-polyfill": "^1.7.3",
"aws-sdk": "^2.1055.0",
"chalk": "^4.1.0",
"cheerio": "^1.0.0-rc.3",
"concurrently": "^7.0.0",
"cypress": "9.2.0",
"eslint": "^8.1.0",
"eslint-import-resolver-node": "0.3.6",
"eslint-import-resolver-typescript": "^2.5.0",
Expand All @@ -72,6 +80,7 @@
"jest": "^26.0.1",
"jsonfile": "^6.0.1",
"meow": "^7.1.1",
"netlify": "10.1.1",
"prettier": "^2.1.2",
"prompt-confirm": "^2.0.4",
"puppeteer": "^9.1.1",
Expand All @@ -81,6 +90,7 @@
"rollup": "^2.36.1",
"rollup-plugin-copy": "^3.3.0",
"semver": "^7.3.4",
"start-server-and-test": "^1.14.0",
"strip-ansi": "^6.0.1",
"typescript": "^4.2.3",
"unified": "^9.2.0"
Expand Down
Loading