-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* debug start error * install inotify-tools before run ci * add warning log once the worker not able to start * add ci for macos * try homebrew for macos * debug macos homebrew * fix lint * add ci for windows * debug ci for windows * split test by os * disable lint for windows since the behaviour is different * add debug code for windows * remove cache since no dependents to catch * test file write event * fix fs_windows missing args * debug ci for windows * debug ci for windows * disable the failing windows test
- Loading branch information
Showing
11 changed files
with
323 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: CI (Macos) | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: macos-latest | ||
env: | ||
MIX_ENV: test | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Set up Homebrew | ||
id: set-up-homebrew | ||
uses: Homebrew/actions/setup-homebrew@master | ||
|
||
- name: Install Elixir | ||
env: | ||
HOMEBREW_NO_AUTO_UPDATE: 1 | ||
run: brew install elixir | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- run: mix deps.get | ||
|
||
- run: mix format --check-formatted | ||
|
||
- run: mix deps.unlock --check-unused | ||
|
||
- run: mix deps.compile | ||
|
||
- run: mix compile --warnings-as-errors | ||
|
||
- run: mix test --only os_macos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: CI (Windows) | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: windows-latest | ||
env: | ||
MIX_ENV: test | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- pair: | ||
elixir: 1.12.3 | ||
otp: 23.3 | ||
- pair: | ||
elixir: 1.15.7 | ||
otp: 26.1 | ||
|
||
steps: | ||
- uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: ${{matrix.pair.otp}} | ||
elixir-version: ${{matrix.pair.elixir}} | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- run: mix deps.get | ||
|
||
- run: mix deps.compile | ||
|
||
- run: mix compile | ||
|
||
- run: mix test --only os_windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,6 @@ file_system-*.tar | |
/tmp | ||
|
||
# Misc | ||
/priv/mac_listener | ||
/priv/mac_listener* | ||
/priv/kqueue | ||
mix.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
defmodule FileSystem.Backends.FSInotifyLinuxTest do | ||
use ExUnit.Case, async: true | ||
import FileSystem.Backends.FSInotify | ||
|
||
@moduletag os_inux: true | ||
|
||
describe "options parse test" do | ||
test "supported options" do | ||
assert {:ok, | ||
[ | ||
~c"-e", | ||
~c"modify", | ||
~c"-e", | ||
~c"close_write", | ||
~c"-e", | ||
~c"moved_to", | ||
~c"-e", | ||
~c"moved_from", | ||
~c"-e", | ||
~c"create", | ||
~c"-e", | ||
~c"delete", | ||
~c"-e", | ||
~c"attrib", | ||
~c"--format", | ||
[37, 119, 1, 37, 101, 1, 37, 102], | ||
~c"--quiet", | ||
~c"-m", | ||
~c"-r", | ||
~c"/tmp" | ||
]} == | ||
parse_options(dirs: ["/tmp"], recursive: true) | ||
|
||
assert {:ok, | ||
[ | ||
~c"-e", | ||
~c"modify", | ||
~c"-e", | ||
~c"close_write", | ||
~c"-e", | ||
~c"moved_to", | ||
~c"-e", | ||
~c"moved_from", | ||
~c"-e", | ||
~c"create", | ||
~c"-e", | ||
~c"delete", | ||
~c"-e", | ||
~c"attrib", | ||
~c"--format", | ||
[37, 119, 1, 37, 101, 1, 37, 102], | ||
~c"--quiet", | ||
~c"-m", | ||
~c"/tmp" | ||
]} == | ||
parse_options(dirs: ["/tmp"], recursive: false) | ||
end | ||
|
||
test "ignore unsupported options" do | ||
assert {:ok, | ||
[ | ||
~c"-e", | ||
~c"modify", | ||
~c"-e", | ||
~c"close_write", | ||
~c"-e", | ||
~c"moved_to", | ||
~c"-e", | ||
~c"moved_from", | ||
~c"-e", | ||
~c"create", | ||
~c"-e", | ||
~c"delete", | ||
~c"-e", | ||
~c"attrib", | ||
~c"--format", | ||
[37, 119, 1, 37, 101, 1, 37, 102], | ||
~c"--quiet", | ||
~c"-m", | ||
~c"/tmp" | ||
]} == | ||
parse_options(dirs: ["/tmp"], recursive: false, unsupported: :options) | ||
|
||
assert {:ok, | ||
[ | ||
~c"-e", | ||
~c"modify", | ||
~c"-e", | ||
~c"close_write", | ||
~c"-e", | ||
~c"moved_to", | ||
~c"-e", | ||
~c"moved_from", | ||
~c"-e", | ||
~c"create", | ||
~c"-e", | ||
~c"delete", | ||
~c"-e", | ||
~c"attrib", | ||
~c"--format", | ||
[37, 119, 1, 37, 101, 1, 37, 102], | ||
~c"--quiet", | ||
~c"-m", | ||
~c"-r", | ||
~c"/tmp" | ||
]} == | ||
parse_options(dirs: ["/tmp"], recursive: :unknown_value) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.