Skip to content

Commit

Permalink
Update actions in ci workflow (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
adambabik authored Feb 3, 2024
1 parent bca0000 commit 8753fd0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Install dependencies
Expand All @@ -28,7 +28,7 @@ jobs:
# to make sure that `make lint` also works.
- name: Run lint from Makefile
run: make lint
- uses: pre-commit/action@v2.0.3
- uses: pre-commit/action@v3.0.0
- name: pre-commit
run: pre-commit run --files $(git diff-tree --no-commit-id --name-only -r HEAD)

Expand All @@ -46,13 +46,13 @@ jobs:
fetch-depth: 0
fetch-tags: true
- name: Setup go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Setup Node version
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
- name: Build
run: |
go build -o runme main.go
Expand All @@ -70,7 +70,7 @@ jobs:
make test
if: ${{ matrix.os == 'windows-latest' }}
- name: Upload coverage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: ${{github.actor != 'dependabot[bot]' && matrix.os == 'ubuntu-latest'}}
with:
name: coverage
Expand All @@ -86,11 +86,11 @@ jobs:
with:
fetch-depth: 0
- name: Setup Node version
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
- name: Setup go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ">=1.21"
- name: Install dependencies
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
with:
fetch-depth: 0
- name: Retrieve saved coverage
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: coverage
path: .
Expand Down
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
args: ["-L=ndoes,nd"] # words that are preceeded with "\n"
exclude: (package.*\.json$|go\.sum)
- repo: https://github.com/TekWizely/pre-commit-golang
rev: v1.0.0-rc.1
hooks:
Expand Down
2 changes: 1 addition & 1 deletion expect/expect.go
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ type GenOptions struct {
Wait func() error
// Close will be called as part of the expect Close, should normally include a Close of the In WriteCloser.
Close func() error
// Check is called everytime a Send or Expect function is called to makes sure the session is still running.
// Check is called every time a Send or Expect function is called to makes sure the session is still running.
Check func() bool
}

Expand Down
2 changes: 1 addition & 1 deletion internal/runnerv2service/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (e *execution) Write(p []byte) (int, error) {
n, err := e.stdinWriter.Write(p)

// Close stdin writer for native commands after handling the initial request.
// Native commands do not support sending data continously, as the native
// Native commands do not support sending data continuously, as the native
// command must have stdin closed to finish.
// Alternatively, there should be a way to signal end of input.
if _, ok := e.Cmd.(*command.NativeCommand); ok {
Expand Down
2 changes: 1 addition & 1 deletion internal/runnerv2service/service_sessions.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ type updateRequest interface {
}

func (r *runnerService) updateSession(sess *command.Session, req updateRequest) error {
// Explictly passed env has higher priority and should be set first.
// Explicitly passed env has higher priority and should be set first.
if err := sess.SetEnv(req.GetEnv()...); err != nil {
return err
}
Expand Down

0 comments on commit 8753fd0

Please sign in to comment.