diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a11a7227..e9aa81ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,7 @@ on: push: branches: - master + - debug pull_request: branches: - master @@ -39,8 +40,6 @@ jobs: # Install npm packages, unless we restored them from cache. # Since `npm ci` removes the node_modules folder before running it’s # important to skip this step if cache was restored. - - name: Lamdera Reset for tests - run: rm -rf elm-stuff $HOME/.elm - name: npm ci if: steps.cache-node_modules.outputs.cache-hit != 'true' env: @@ -69,8 +68,7 @@ jobs: - name: Build elm docs id: docs run: npx --no-install elm make --docs docs.json - - name: Lamdera Reset for cypress - run: yes | lamdera reset + - name: Setup for cypress run: (cd examples/end-to-end && npm install && npx elm-tooling install && rm -rf elm-stuff && npx elm-pages codegen && lamdera make app/Route/Index.elm) - name: Cypress tests diff --git a/package.json b/package.json index 8856fe61..fa423174 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "main": "index.js", "scripts": { "start": "cd examples/end-to-end && npm i && npx elm-pages dev", - "test": "set -x; (cd examples/routing && npm i && npm run build && elm-test-rs --compiler=lamdera) && npm run test:snapshot && npx elmi-to-json --version && rm -rf elm-stuff && elm-verify-examples --run-tests --elm-test-args '--compiler=lamdera' && elm-test-rs --compiler=lamdera && (cd generator && mocha)", + "test": "./test.sh", "test:snapshot": "(cd examples/escaping && npm install && npm test) && (cd examples/base-path && npm install && npm test)", "cypress": "npm start & cypress run", "review": "elm-review" @@ -73,4 +73,4 @@ "bin": { "elm-pages": "generator/src/cli.js" } -} +} \ No newline at end of file diff --git a/test.sh b/test.sh new file mode 100755 index 00000000..25d021e8 --- /dev/null +++ b/test.sh @@ -0,0 +1,9 @@ +set -ex; +root=`pwd` +yes | lamdera reset || true +elm-test-rs --compiler=lamdera +cd examples/routing && npm i && npm run build && elm-test-rs --compiler=lamdera && cd $root +npm run test:snapshot +npx elmi-to-json --version +elm-verify-examples --run-tests --elm-test-args '--compiler=lamdera' +cd generator && mocha && cd $root