Skip to content

Commit

Permalink
Refactor smoke tests to use submodules (#2702)
Browse files Browse the repository at this point in the history
* chore: delete inlined repos

* refactor: move smoke tests to submodules

* chore: remove smoke sync action

* chore: update ci to fetch submodules for smoke test only

* chore: fix ci script

* feat: delete inlined smoke tests

* fix: update lockfile to exclude smoke tests

* chore(ci): ensure smoke tests can pass in CI
  • Loading branch information
natemoo-re authored Mar 2, 2022
1 parent caf9135 commit 2482fe7
Show file tree
Hide file tree
Showing 373 changed files with 44 additions and 39,225 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ jobs:
- build
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Setup Node
uses: actions/setup-node@v2
Expand All @@ -203,11 +205,11 @@ jobs:
cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-
- name: Install NPM Dependencies
run: yarn install --prefer-offline --frozen-lockfile --ignore-engines --registry https://registry.npmjs.org --network-timeout 300000
# NOTE: Do NOT use `--frozen-lockfile` here! The lockfile needs to be updated in order to pull the submodules into the monorepo
run: yarn install --prefer-offline --ignore-engines --registry https://registry.npmjs.org --network-timeout 300000
env:
CI: true

# Turbo seems to fail on Windows, so run a custom script directly.
- name: Test
run: yarn test:smoke

Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,32 +61,3 @@ jobs:
body: >
This PR is auto-generated by a nightly GitHub action.
It should automatically be merged if tests pass.
smoke-sync:
if: github.repository_owner == 'withastro'
runs-on: ubuntu-latest
steps:
- name: Check out code using Git
uses: actions/checkout@v2
- name: Set Node version to 16
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-engines --ignore-scripts
- name: Sync smoke tests
run: node scripts/smoke/sync.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Pull Request
id: createpr
uses: peter-evans/create-pull-request@v3
with:
branch: ci/smoke-sync
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: '[ci] update smoke tests (remote)'
title: '[ci] update smoke tests (remote)'
body: >
This PR is auto-generated by a nightly GitHub action.
It should automatically be merged if tests pass.
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[submodule "smoke/docs"]
path = smoke/docs
url = git@github.com:withastro/docs.git
branch = main
[submodule "smoke/astro.build"]
path = smoke/astro.build
url = git@github.com:withastro/astro.build.git
branch = main
97 changes: 0 additions & 97 deletions scripts/smoke/sync.js

This file was deleted.

1 change: 1 addition & 0 deletions smoke/astro.build
Submodule astro.build added at d3d0b5
130 changes: 0 additions & 130 deletions smoke/astro.build-main/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions smoke/astro.build-main/README.md

This file was deleted.

33 changes: 0 additions & 33 deletions smoke/astro.build-main/astro.config.ts

This file was deleted.

33 changes: 0 additions & 33 deletions smoke/astro.build-main/package.json

This file was deleted.

Loading

0 comments on commit 2482fe7

Please sign in to comment.