Migrate to GitHub Actions
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Junegunn Choi · committed by Junegunn Choi · parent c611573 · Browse files · 5 files·+96 added−37 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
5 files+96 added−37 removed
- tests:+5 added−4 removed
- other:+91 added−33 removed
Provenance
- Commit
e922704- Tree
09df0fa- Author
Junegunn Choi <junegunn.c@gmail.com>- Committer
Junegunn Choi <junegunn.c@gmail.com>- Parent
c611573
5 files changed+96 added−37 removed
added:.github/workflows/linux.yml+47 added
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647---name: Test fzf on Linux
on: push: branches: [ master, devel ] pull_request: branches: [ master ]
jobs: build: runs-on: ubuntu-latest strategy: matrix: go: [1.14, 1.15] steps: - uses: actions/checkout@v2 with: fetch-depth: 0
- name: Set up Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go }}
- name: fish-actions/install-fish uses: fish-actions/install-fish@v1.0.0
- name: Setup Ruby uses: ruby/setup-ruby@v1.62.0 with: ruby-version: 3.0.0
- name: Install packages run: sudo apt-get install --yes zsh tmux
- name: Install Ruby gems run: sudo gem install --no-document minitest:5.14.2 rubocop:1.0.0 rubocop-minitest:0.10.1 rubocop-performance:1.8.1
- name: Rubocop run: rubocop --require rubocop-minitest --require rubocop-performance
- name: Unit test run: make test
- name: Integration test run: make install && ./install --all && LC_ALL=C tmux new-session -d && ruby test/test_go.rb --verboseadded:.github/workflows/macos.yml+44 added
1234567891011121314151617181920212223242526272829303132333435363738394041424344---name: Test fzf on macOS
on: push: branches: [ master, devel ] pull_request: branches: [ master ]
jobs: build: runs-on: macos-latest strategy: matrix: go: [1.14, 1.15] steps: - uses: actions/checkout@v2 with: fetch-depth: 0
- name: Set up Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go }}
- name: Setup Ruby uses: ruby/setup-ruby@v1.62.0 with: ruby-version: 3.0.0
- name: Install packages run: HOMEBREW_NO_INSTALL_CLEANUP=1 brew install fish zsh tmux
- name: Install Ruby gems run: gem install --no-document minitest:5.14.2 rubocop:1.0.0 rubocop-minitest:0.10.1 rubocop-performance:1.8.1
- name: Rubocop run: rubocop --require rubocop-minitest --require rubocop-performance
- name: Unit test run: make test
- name: Integration test run: make install && ./install --all && LC_ALL=C tmux new-session -d && ruby test/test_go.rb --verbosemodified:src/history_test.go-5 removed
1 unmodified line2 3 import (4 "io/ioutil"5 "os"6- "os/user"6 "runtime"7 "testing"8 )9 10 func TestHistory(t *testing.T) {11 maxHistory := 5012 13 // Invalid arguments15- user, _ := user.Current()14 var paths []string15 if runtime.GOOS == "windows" {16 // GOPATH should exist, so we shouldn't be able to override it17 paths = []string{os.Getenv("GOPATH")}18 } else {19 paths = []string{"/etc", "/proc"}22- if user.Name != "root" {23- paths = append(paths, "/etc/sudoers")24- }20 }21 22 for _, path := range paths {23 if _, e := NewHistory(path, maxHistory); e == nil {45 unmodified linesmodified:test/test_go.rb+5 added-4 removed
146 unmodified lines147 148 def prepare149 tries = 0150 begin151- self.until do |lines|152- send_keys ' ', 'C-u', :Enter, 'hello', :Left, :Right153- lines[-1] == 'hello'151+ self.until(true) do |lines|152+ message = "Prepare[#{tries}]"153+ send_keys ' ', 'C-u', :Enter, message, :Left, :Right154+ lines[-1] == message155 end156 rescue Minitest::Assertion157 (tries += 1) < 5 ? retry : raise158 end158- send_keys 'C-u'159+ send_keys 'C-u', 'C-l'160 end161 162 private163 2185 unmodified linesdeleted:.travis.yml-28 removed
12345678910111213141516171819202122232425262728language: gogo: - "1.14"env: GO111MODULE=onos: - linux - osxdist: bionicosx_image: xcode12.2addons: apt: packages: - fish - zsh sources: sourceline: ppa:fish-shell/release-3 homebrew: packages: - fish - tmuxinstall: gem install --no-document minitest:5.14.2 rubocop:1.0.0 rubocop-minitest:0.10.1 rubocop-performance:1.8.1script: - make test # LC_ALL=C to avoid escape codes in # printf %q $'\355\205\214\354\212\244\355\212\270' on macOS. Bash on # macOS is built without HANDLE_MULTIBYTE? - make install && ./install --all && LC_ALL=C tmux new-session -d && ruby test/test_go.rb --verbose - rubocop --require rubocop-minitest --require rubocop-performance