Skip to content

Commit

Permalink
Merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
dac09 committed Jan 18, 2024
2 parents 6a31c00 + 6d74a22 commit d773116
Show file tree
Hide file tree
Showing 155 changed files with 877 additions and 12,125 deletions.
8 changes: 0 additions & 8 deletions .github/actions/check_test_project_fixture/action.yml

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions .github/actions/check_test_project_fixture/package.json

This file was deleted.

66 changes: 0 additions & 66 deletions .github/actions/check_test_project_fixture/yarn.lock

This file was deleted.

47 changes: 40 additions & 7 deletions .github/workflows/check-test-project-fixture.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,47 @@ jobs:
- name: Enable Corepack
run: corepack enable

- uses: actions/setup-node@v4
- name: ⬢ Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- run: yarn install
working-directory: ./.github/actions/check_test_project_fixture
- name: 🐈 Set up yarn cache
if: "!contains(github.event.pull_request.labels.*.name, 'fixture-ok')"
uses: ./.github/actions/set-up-yarn-cache

- name: Check test project fixture
uses: ./.github/actions/check_test_project_fixture
with:
labels: '{ "labels": ${{ toJSON(github.event.pull_request.labels) }} }'
- name: 🐈 Yarn install
if: "!contains(github.event.pull_request.labels.*.name, 'fixture-ok')"
run: yarn install --inline-builds
env:
GITHUB_TOKEN: ${{ github.token }}

- name: 🔨 Build
if: "!contains(github.event.pull_request.labels.*.name, 'fixture-ok')"
run: yarn build

- name: Rebuild test-project fixture
if: "!contains(github.event.pull_request.labels.*.name, 'fixture-ok')"
run: yarn rebuild-test-project-fixture
env:
REDWOOD_DISABLE_TELEMETRY: 1
YARN_ENABLE_IMMUTABLE_INSTALLS: false

- name: Check for changed files
if: "!contains(github.event.pull_request.labels.*.name, 'fixture-ok')"
run: |
if [ $(git status --porcelain | wc -l) -gt 0 ]; then
echo 'Updating the test project fixture caused files to change'
echo 'Please run `yarn rebuild-test-project-fixture` locally and commit any changes'
echo
echo 'Deleted files:'
git status --porcelain | grep '^ D ' | awk '{print " " $2}'
echo
echo 'Modified files:'
git status --porcelain | grep '^ M ' | awk '{print " " $2}'
echo
echo 'Untracked files:'
git status --porcelain | grep '^?? ' | awk '{print " " $2}'
echo
exit 1;
fi
59 changes: 30 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,54 +179,55 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}

- name: 📁 Create a temporary directory
id: createpath
run: |
project_path=$(mktemp -d -t redwood.XXXXXX)
echo "::set-output name=project_path::$project_path"
framework_path=$(pwd)
echo "::set-output name=framework_path::$framework_path"
- name: 🔨 Build
run: yarn build

- name: 🌲 Install Cypress
run: yarn cypress install

- name: 🌲 Create a Redwood App
run: |
./tasks/run-e2e ${{ steps.createpath.outputs.project_path }} \
--no-start \
--bundler ${{ matrix.bundler }}
id: crwa
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false

- name: 🐙 Git init in the Redwood App directory
run: |
project_path=$(mktemp -d -t redwood.XXXXXX)
echo "project-path=$project_path" >> $GITHUB_OUTPUT
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git init --initial-branch main && git add .
git commit -a --message=init
working-directory: ${{ steps.createpath.outputs.project_path }}
- name: Start server in background
run: yarn rw dev --no-generate --fwd="--no-open" &
working-directory: ${{ steps.createpath.outputs.project_path }}
./tasks/run-e2e "$project_path" \
--bundler ${{ matrix.bundler }} \
--no-build-framework \
--no-start
- name: 🌲 Install Cypress
run: yarn run cypress install
- name: Start the dev server in the background
run: |
yarn rw dev --no-generate --fwd="--no-open" 2>&1 | tee dev_server.log &
working-directory: ${{ steps.crwa.outputs.project-path }}

- name: 🌲 Run cypress
uses: cypress-io/github-action@v5
- name: 🌲 Run Cypress
uses: cypress-io/github-action@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_RW_PATH: "${{ steps.createpath.outputs.project_path }}"
CYPRESS_RW_PATH: ${{ steps.crwa.outputs.project-path }}
with:
# We've already installed dependencies.
install: false
env: true
browser: chrome
record: false
env: true
install: false
wait-on: 'http://[::1]:8910'
working-directory: ./tasks/e2e
spec: |
cypress/e2e/01-tutorial/*.cy.js
cypress/e2e/04-logger/*.cy.js
- uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.bundler }}-logs
path: |
${{ steps.crwa.outputs.project-path }}/dev_server.log
${{ steps.crwa.outputs.project-path }}/e2e.log
tutorial-e2e-skip:
needs: detect-changes
if: needs.detect-changes.outputs.onlydocs == 'true'
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/test-project/.redwood/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ You don't need to commit any other contents of this directory to your version co
| :---------------- | :------- |
| commandCache.json | This file contains mappings to assist the Redwood CLI in efficiently executing commands. |
| schema.graphql | This is the GraphQL schema which has been automatically generated from your Redwood project. |
| studio.db | The sqlite database used by the experimental `rw exp studio` feature. |
| telemetry.txt | Contains a unique ID used for telemetry. This value is rotated every 24 hours to protect your project's anonymity. |
| test.db | The sqlite database used when running tests. |

Expand All @@ -32,6 +31,7 @@ You don't need to commit any other contents of this directory to your version co
| telemetry | Stores the recent telemetry that the Redwood CLI has generated. You may inspect these files to see everything Redwood is anonymously collecting. |
| types | Stores the results of type generation. |
| updateCheck | Stores a file which contains the results of checking for Redwood updates. |
| studio | Used to store data for `rw studio` |

We try to keep this README up to date but you may, from time to time, find other files or directories in this `.redwood` directory that have not yet been documented here. This is likely nothing to worry about but feel free to let us know and we'll update this list.

Expand Down
4 changes: 2 additions & 2 deletions __fixtures__/test-project/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"@redwoodjs/vite": "6.0.7",
"@types/react": "18.2.37",
"@types/react-dom": "18.2.15",
"autoprefixer": "^10.4.16",
"autoprefixer": "^10.4.17",
"postcss": "^8.4.33",
"postcss-loader": "^7.3.4",
"postcss-loader": "^8.0.0",
"prettier-plugin-tailwindcss": "0.4.1",
"tailwindcss": "^3.4.1"
}
Expand Down
Loading

0 comments on commit d773116

Please sign in to comment.