fix/step-umask a16908b

names_test.go RawHistoryFolder

1// SPDX-License-Identifier: MIT
2
3package executor
4
5import (
6	"strings"
7	"testing"
8)
9
10// Recorded on github.com (ctx-github-names): names that only read the
11// contexts of the job message are evaluated when the job starts, with
12// github.job empty, while the script of the step runs with the real job key.
13func TestNamesSeeAnEmptyGithubJob(t *testing.T) {
14	needTools(t, "bash")
15	yaml := `on: push
16jobs:
17  first-job:
18    name: Display name of ${{ github.job }}
19    runs-on: ubuntu-24.04
20    steps:
21      - run: echo "job=${{ github.job }}"
22      - name: late ${{ github.job }} ${{ env.X }}
23        env:
24          X: x
25        run: echo hi
26`
27	rec, res := runLocal(t, yaml, "first-job", nil)
28	if res.Conclusion != ConclusionSuccess {
29		t.Fatalf("%+v %v", res, rec.names())
30	}
31	if got := rec.steps[0].Log; got[len(got)-1] != "Complete job name: Display name of" {
32		t.Errorf("job name: %v", got)
33	}
34	s := rec.step(t, `Run echo "job="`)
35	if !strings.Contains(logOf(s), `##[group]Run echo "job=first-job"`) || !strings.Contains(logOf(s), "\njob=first-job") {
36		t.Errorf("the script must see the real job key:\n%s", logOf(s))
37	}
38	// A name that reads env is not available at job start: evaluated with the
39	// step's contexts, where github.job is the key.
40	rec.step(t, "late first-job x")
41}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 4

Tags 11

↑↓ moveenter openesc close