Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trex run scripts crash within GitHub Actions #123

Open
piuswalter opened this issue Mar 4, 2022 · 0 comments
Open

Trex run scripts crash within GitHub Actions #123

piuswalter opened this issue Mar 4, 2022 · 0 comments

Comments

@piuswalter
Copy link

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

  1. 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
  1. 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"
  ]
}
  1. 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):

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant