Skip to content

Commit

Permalink
Merge branch 'main' into release-v1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chaance committed May 17, 2022
2 parents 89327a9 + 15d18e6 commit 0c2f007
Show file tree
Hide file tree
Showing 172 changed files with 2,115 additions and 293 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/nightly.yml
Expand Up @@ -4,12 +4,12 @@ on:
schedule:
- cron: "0 7 * * *" # every day at 12AM PST

# HEADS UP! this workflow will only ever run on the `main` branch due to it being a cron job,
# and the last commit on main will be what github shows as the trigger
# however in the checkout below we specify the `dev` branch, so all the scripts
# will be ran from that, confusing i know, so in some cases we'll need to create
# multiple PRs when modifying nightly release processes
jobs:
# HEADS UP! this "nightly" job will only ever run on the `main` branch due to it being a cron job,
# and the last commit on main will be what github shows as the trigger
# however in the checkout below we specify the `dev` branch, so all the scripts
# in this job will be ran from that, confusing i know, so in some cases we'll need to create
# multiple PRs when modifying nightly release processes
nightly:
name: 🌒 Nightly Release
if: github.repository == 'remix-run/remix'
Expand Down Expand Up @@ -99,4 +99,4 @@ jobs:
with:
token: ${{ secrets.NIGHTLY_PAT }}
event-type: release
client-payload: '{ "ref": "refs/tags/v${{ needs.nightly.outputs.NEXT_VERSION }}" }'
client-payload: '{ "ref": "refs/tags/v${{ needs.nightly.outputs.NEXT_VERSION }}", "version": "${{ needs.nightly.outputs.NEXT_VERSION }}" }'
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Expand Up @@ -54,4 +54,4 @@ jobs:
with:
token: ${{ secrets.NIGHTLY_PAT }}
event-type: release
client-payload: '{ "ref": "${{ github.ref }}" }'
client-payload: '{ "ref": "${{ github.ref }}", "version": "${{ github.ref_name }}" }'
248 changes: 248 additions & 0 deletions .github/workflows/stacks.yml
@@ -0,0 +1,248 @@
name: 🥞 Remix Stacks Test

on:
repository_dispatch:
types: [release]

jobs:
setup:
name: Remix Stacks Test
if: github.repository == 'remix-run/remix'
runs-on: ubuntu-latest
strategy:
matrix:
stack:
- repo: "remix-run/indie-stack"
name: "indie"
- repo: "remix-run/blues-stack"
name: "blues"
- repo: "remix-run/grunge-stack"
name: "grunge"
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 16

- name: ⚒️ Create new ${{ matrix.stack.name }} app with ${{ github.event.client_payload.version }}
run: |
npx -y create-remix@${{ github.event.client_payload.version }} ${{ matrix.stack.name }} --template ${{ matrix.stack.repo }} --typescript --no-install
- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
working-directory: ${{ matrix.stack.name }}
useLockFile: false

- name: Run `remix init`
run: |
cd ${{ matrix.stack.name }}
npx remix init
- name: 🏄 Copy test env vars
run: |
cd ${{ matrix.stack.name }}
cp .env.example .env
- name: 📁 Zip artifact
run: zip ${{ matrix.stack.name }}.zip ./${{ matrix.stack.name }} -r -x "**/node_modules/*"

- name: 🗄️ Archive ${{ matrix.stack.name }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.stack.name }}-archive
path: ${{ matrix.stack.name }}.zip

lint:
name: ⬣ ESLint
if: github.repository == 'remix-run/remix'
needs: [setup]
runs-on: ubuntu-latest
strategy:
matrix:
stack:
- repo: "remix-run/indie-stack"
name: "indie"
- repo: "remix-run/blues-stack"
name: "blues"
- repo: "remix-run/grunge-stack"
name: "grunge"
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 16

- name: 🗄️ Restore ${{ matrix.stack.name }}
uses: actions/download-artifact@v3
with:
name: ${{ matrix.stack.name }}-archive

- name: 📁 Unzip artifact
run: unzip ${{ matrix.stack.name }}.zip

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
working-directory: ${{ matrix.stack.name }}

- name: 🔬 Lint
run: |
cd ${{ matrix.stack.name }}
npm run lint
typecheck:
name: ʦ TypeScript
needs: [setup]
if: github.repository == 'remix-run/remix'
runs-on: ubuntu-latest
strategy:
matrix:
stack:
- repo: "remix-run/indie-stack"
name: "indie"
- repo: "remix-run/blues-stack"
name: "blues"
- repo: "remix-run/grunge-stack"
name: "grunge"
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 16

- name: 🗄️ Restore ${{ matrix.stack.name }}
uses: actions/download-artifact@v3
with:
name: ${{ matrix.stack.name }}-archive

- name: 📁 Unzip artifact
run: unzip ${{ matrix.stack.name }}.zip

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
working-directory: ${{ matrix.stack.name }}

- name: 🔎 Type check
run: |
cd ${{ matrix.stack.name }}
npm run typecheck --if-present
vitest:
name: ⚡ Vitest
if: github.repository == 'remix-run/remix'
needs: [setup]
runs-on: ubuntu-latest
strategy:
matrix:
stack:
- repo: "remix-run/indie-stack"
name: "indie"
- repo: "remix-run/blues-stack"
name: "blues"
- repo: "remix-run/grunge-stack"
name: "grunge"
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 16

- name: 🗄️ Restore ${{ matrix.stack.name }}
uses: actions/download-artifact@v3
with:
name: ${{ matrix.stack.name }}-archive

- name: 📁 Unzip artifact
run: unzip ${{ matrix.stack.name }}.zip

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
working-directory: ${{ matrix.stack.name }}

- name: ⚡ Run vitest
run: |
cd ${{ matrix.stack.name }}
npm run test -- --coverage
cypress:
name: ⚫️ Cypress
if: github.repository == 'remix-run/remix'
needs: [setup]
runs-on: ubuntu-latest
strategy:
matrix:
stack:
- repo: "remix-run/indie-stack"
name: "indie"
cypress: "npm run start:mocks"
- repo: "remix-run/blues-stack"
name: "blues"
cypress: "npm run start:mocks"
- repo: "remix-run/grunge-stack"
name: "grunge"
cypress: "npm run dev"
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 16

- name: 🗄️ Restore ${{ matrix.stack.name }}
uses: actions/download-artifact@v3
with:
name: ${{ matrix.stack.name }}-archive

- name: 📁 Unzip artifact
run: unzip ${{ matrix.stack.name }}.zip

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
working-directory: ${{ matrix.stack.name }}

- name: 🐳 Docker compose
if: ${{ matrix.stack.name == 'blues' }}
# the sleep is just there to give time for postgres to get started
run: |
cd ${{ matrix.stack.name }}
docker-compose up -d && sleep 3
env:
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/postgres"

- name: 🛠 Setup Database
if: ${{ matrix.stack.name != 'grunge' }}
run: |
cd ${{ matrix.stack.name }}
npx prisma migrate reset --force
- name: ⚙️ Build
run: |
cd ${{ matrix.stack.name }}
npm run build
- name: 🌳 Cypress run
uses: cypress-io/github-action@v3
with:
start: ${{ matrix.stack.cypress }}
wait-on: "http://localhost:8811"
working-directory: ${{ matrix.stack.name }}
env:
PORT: "8811"
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Expand Up @@ -11,7 +11,10 @@ on:
paths-ignore:
- "docs/**"
- "**/README.md"
pull_request: {}
pull_request:
paths-ignore:
- "docs/**"
- "**/*.md"

jobs:
build:
Expand Down
16 changes: 11 additions & 5 deletions DEVELOPMENT.md
Expand Up @@ -44,20 +44,26 @@ git checkout dev
# create a prerelease tag.
yarn release start patch|minor|major

# Once you create the pre-release, you can run tests and even publish a pre-release
# directly to ensure everything works as expected. If there are any issues, fix the bugs and commit directly to the pre-release branch. Once you're done working, you
# can iterate with a new pre-release with the following command:
# At this point you can push to GitHub...
git push origin/release-<version> --follow-tags
# ...then publish the pre-release by creating a release in the GitHub UI. Don't
# forget to check the pre-release checkbox!

# If there are any issues with the pre-release, fix the bugs and commit directly
# to the release branch. You can iterate with a new pre-release with the following # command, then publish via GitHub the same as before.
yarn release bump

# Once all tests have passed and the release is ready to be made stable, the following
# command will create a new stable release tag, merge changes back into the dev branch,
# and prompt you to push the changes and tags to GitHub
yarn release finish
git push origin/release-<version> --follow-tags

# Now you can create the release from GitHub from the new tag and write release notes!
```

Once the release is finished, you should see tests run in GitHub actions. Assuming there are no issues (you should also run tests locally before pushing) you can trigger publishing by creating a new release in the GitHub UI, this time using the stable release tag.

After the release process is complete, be sure to merge the release branch back into `dev` and `main` and push both branches to GitHub.

### `create-remix`

All packages are published together except for `create-remix`, which is
Expand Down

0 comments on commit 0c2f007

Please sign in to comment.