From 86c2c1d1cf06613539196fb4f37d4ebc749ed8ac Mon Sep 17 00:00:00 2001 From: James Duncombe Date: Tue, 27 Oct 2020 18:18:32 +0000 Subject: [PATCH] Add Github action for tests --- .github/workflows/elixir.yml | 34 ++++++++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/elixir.yml diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml new file mode 100644 index 0000000..1577198 --- /dev/null +++ b/.github/workflows/elixir.yml @@ -0,0 +1,34 @@ +name: tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + MIX_ENV: test + +jobs: + build: + + name: Build and test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Elixir + uses: actions/setup-elixir@v1 + with: + elixir-version: '1.11.0' + otp-version: '23' + - name: Restore dependencies cache + uses: actions/cache@v2 + with: + path: deps + key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} + restore-keys: ${{ runner.os }}-mix- + - name: Install dependencies + run: mix deps.get + - name: Run tests + run: mix test diff --git a/README.md b/README.md index b61011f..b90011c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Petal 🌺 +![tests](https://github.com/jamesduncombe/petal/workflows/tests/badge.svg) + Petal is a [Bloom filter](https://en.wikipedia.org/wiki/Bloom_filter) in Elixir. Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc).