Skip to content

Commit

Permalink
Short tests don't rely on PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
maaslalani committed Jun 26, 2021
1 parent a158018 commit 09f46ba
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
uses: golangci/golangci-lint-action@v2

- name: Test
run: go test -race -v ./...
run: go test -race -v -short ./...
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Pull requests welcome!
Take a look at the [Development Docs](./docs/development/README.md).

Pull requests are welcome!
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
make:
go run main.go examples/slides.md

test:
go test ./... -short

build:
go build -o slides

Expand Down
5 changes: 5 additions & 0 deletions docs/development/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ everything still works.
If you're adding a feature that requires a specific piece of markdown, you can
add a file with your test case into `examples/<test>.md` and iterate on that file.

Ensure tests are still passing
```
make test
```

### Breaking Changes
Most changes should be entirely backwards compatible.
Ensure that `slides examples/slides.md` still works.
Expand Down
3 changes: 3 additions & 0 deletions internal/code/execute_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ func main() {
}

for _, tc := range tt {
if testing.Short() {
t.SkipNow()
}
r := code.Execute(tc.block)
if r.Out != tc.expected.Out {
t.Fatalf("invalid output, got %s, want %s", r.Out, tc.expected.Out)
Expand Down
2 changes: 1 addition & 1 deletion internal/code/languages.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ var Languages = map[string]Language{
},
Elixir: {
Extension: "exs",
Command: []string{"elixir"},
Command: []string{"elixir"},
},
}

0 comments on commit 09f46ba

Please sign in to comment.