Skip to content

Commit

Permalink
Merge pull request #387 from LeaYeh/ci-fix-test-case-printout
Browse files Browse the repository at this point in the history
[CI] Fix test case printout + add test image for remote connection into the GitHub Action runner
  • Loading branch information
LeaYeh authored Nov 15, 2024
2 parents 1cff8bf + dd51ea5 commit f459d3e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/scripts/print_test_case.sh
Original file line number Diff line number Diff line change
@@ -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")")
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/test_image.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f459d3e

Please sign in to comment.