Trex
Trex copied to clipboard
Trex run scripts crash within GitHub Actions
Describe the bug
When calling trex run [...]
in GitHub Actions, they throw an error and abort with error: Uncaught (in promise) Permission denied (os error 13)
.
To Reproduce
- Create a GitHub Actions workflow file as follows.
name: CI - Linting - Backend
on:
pull_request:
jobs:
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Install Trex
run: deno install -A --unstable --import-map=https://deno.land/x/trex/import_map.json -n trex --no-check https://deno.land/x/trex/cli.ts
- name: Format the backend
run: cd backend/ && trex run fmt
- name: Lint the backend
run: cd backend/ && trex run lint
- name: Test the backend
run: cd backend/ && trex run test
- The scripts were created in the
run.json
as follows.
{
"scripts": {
"lint": "deno lint --config deno.json",
"fmt": "deno fmt --config deno.json",
"test": "deno test --config deno.json --import-map=../import_map.json",
},
"files": [
"./src"
]
}
- The following error will occur and stop the GitHub Actions.
Run cd backend/ && trex run fmt
cd backend/ && trex run fmt
shell: /usr/bin/bash -e {0}
error: Uncaught (in promise) Permission denied (os error 13)
Error: Process completed with exit code 1.
Expected behavior
The GitHub Actions should run the Trex scripts without any problems and should not throw any error and abort.
Screenshots
There are no screenshots available for this problem.
Desktop (please complete the following information):
- OS: Ubuntu 20.04.3 LTS
- Deno version:
v1.19.0
- Trex Version
v1.10.0
Additional context
Maybe the problem is caused by the exec deno run --allow-all --quiet --no-check --unstable --import-map 'https://deno.land/x/trex/import_map.json' 'https://deno.land/x/trex/cli.ts' "$@"
statement in the trex
file in ~/.deno/bin/
. This Stack Overflow post describes the problem with GitHub Actions and exec
.