Skip to content

Commit

Permalink
ci: prerelease test infrastructure (remix-run#1408)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcansh authored Jan 14, 2022
1 parent 2dc7939 commit c8dc234
Show file tree
Hide file tree
Showing 26 changed files with 3,707 additions and 1,405 deletions.
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

0 comments on commit c8dc234

Please sign in to comment.