Skip to content

Commit

Permalink
chore(ci): use (Linux/macOS portable) temporary folder for template t…
Browse files Browse the repository at this point in the history
…ests (#363)
  • Loading branch information
shaftoe authored Feb 6, 2021
1 parent 6026ccd commit 3b212cd
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm ci
- run: npm run build
- run: npm run test:clean
# XXX: might be possible to parallelize each template test too, .e.g. `npm run test:template ${{ matrix.template }}`
- run: npm run test

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ yarn.lock

# Test-related generated folders
coverage
tmp-test

# Miscellaneous
.DS_Store
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"scripts": {
"test": "./script/test-all-templates.sh",
"test:template": "./script/test-template.sh",
"test:clean": "rimraf tmp-test",
"lint": "prettier --ignore-path .gitignore --check '**/*.{js,ts,json,yml,md}'",
"lint:fix": "prettier --ignore-path .gitignore --write '**/*.{js,ts,json,yml,md}'",
"dev": "tsc-watch --onFirstSuccess \"npm run dev:make-exec\"",
Expand Down
2 changes: 1 addition & 1 deletion script/test-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o pipefail # Exit when any program execution in a pipeline breaks

readonly APP="./bin/create-probot-app.js"
readonly TEMPLATE=$1
readonly TEST_FOLDER="./tmp-test/${TEMPLATE}"
readonly TEST_FOLDER=$(mktemp -d -t cpa-XXXXXXXXXX)
readonly LOGFILENAME="test.output"
readonly LOGFILE="${TEST_FOLDER}/${LOGFILENAME}"

Expand Down

0 comments on commit 3b212cd

Please sign in to comment.