diff --git a/.github/scripts/print_test_case.sh b/.github/scripts/print_test_case.sh index 8cf339d8..2ee00c34 100644 --- a/.github/scripts/print_test_case.sh +++ b/.github/scripts/print_test_case.sh @@ -1,7 +1,7 @@ #!/bin/bash test_number=$(echo "$LINE" | grep -oP '\d+(?=:)' | head -1 || true) -line_number=$(echo "$LINE" | grep -oP '\d+' | tail -1 || true) +line_number=$(echo "$LINE" | grep -oP '(?<=:)\d+' | tail -1 || true) file_path=$(echo "$LINE" | grep -oP '\s*'"$TESTER_DIR"'/cmds/.*\.sh' || true) file_basename=$(basename "${file_path%.*}") file_dirname=$(basename "$(dirname "$file_path")") diff --git a/.github/workflows/test_image.yaml b/.github/workflows/test_image.yaml new file mode 100644 index 00000000..54c03f0f --- /dev/null +++ b/.github/workflows/test_image.yaml @@ -0,0 +1,21 @@ +# .github/workflows/test_image.yaml +name: Test Image +on: + workflow_dispatch: +env: + HOME: /home/runner + TESTER_DIR: /home/runner/42_minishell_tester + SCRIPTS_DIR: /home/runner/scripts + +jobs: + remote_connect: + name: Remote Connect + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - name: Checkout source branch of pull request + uses: actions/checkout@v4 + - name: Set up test environment + uses: ./.github/actions/setup + - name: Set up tmate session + uses: mxschmitt/action-tmate@v3