updates for tests
This commit is contained in:
parent
2cb276ca05
commit
9179d8924d
|
@ -267,8 +267,9 @@ func (rc *RunContext) createStepContainerName(stepID string) string {
|
|||
|
||||
prefix := regexp.MustCompile("[^a-zA-Z0-9]").ReplaceAllString(rc.createContainerName(), "-")
|
||||
suffix := regexp.MustCompile("[^a-zA-Z0-9]").ReplaceAllString(stepID, "-")
|
||||
containerName := trimToLen(prefix, 30-len(suffix))
|
||||
return fmt.Sprintf("%s%s%s", prefix, containerName, suffix)
|
||||
prefix = trimToLen(prefix, 30-(1+len(suffix)))
|
||||
name := strings.Trim(fmt.Sprintf("%s-%s", prefix, suffix), "-")
|
||||
return name
|
||||
}
|
||||
|
||||
func trimToLen(s string, l int) string {
|
||||
|
|
|
@ -57,13 +57,13 @@ func TestRunEvent(t *testing.T) {
|
|||
table := table
|
||||
t.Run(table.workflowPath, func(t *testing.T) {
|
||||
platforms := map[string]string{
|
||||
"ubuntu-latest": "ubuntu:18.04",
|
||||
"ubuntu-latest": "node:12.6-buster-slim",
|
||||
}
|
||||
runnerConfig := &Config{
|
||||
Workdir: "testdata",
|
||||
EventName: table.eventName,
|
||||
Platforms: platforms,
|
||||
ReuseContainers: true,
|
||||
ReuseContainers: false,
|
||||
}
|
||||
runner, err := New(runnerConfig)
|
||||
assert.NilError(t, err, table.workflowPath)
|
||||
|
|
|
@ -6,11 +6,12 @@ jobs:
|
|||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: which node
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
registry-url: https://registry.npmjs.org/
|
||||
|
||||
- run: which node
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
|
|
Loading…
Reference in New Issue