Skip to content

Commit

Permalink
ci: Run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
obiwac committed Sep 4, 2024
1 parent a2af710 commit 511356e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Run tests

on: [push, pull_request, workflow_dispatch]

jobs:
run_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up compiler
uses: egor-tensin/setup-clang@v1
with:
version: latest
platform: x64
- name: Build
run: sh build.sh
- name: Run tests
run: sh tests.sh
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ Run:
sh build.sh
```

Then, to run the tests:

```console
sh test.sh
```

## Update the grammar

Flamingo uses Tree-sitter to parse source code. This is all defined in the [`tree-sitter-flamingo`](https://github.com/inobulles/tree-sitter-flamingo) repo. The readme there contains instructions on how to generate the parser from the grammar.
Expand Down
3 changes: 0 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@ cc $cc_flags -ferror-limit=0 -c flamingo/flamingo.c -o bin/flamingo.o
cc $cc_flags -c main.c -o bin/main.o

cc $(find bin -name "*.o") -lm $cc_flags -o bin/flamingo

bin/flamingo hello_world.fl
sh tests.sh

0 comments on commit 511356e

Please sign in to comment.