diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 37b968b..38f0a51 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,6 +1,7 @@ name: Docker + on: push: branches: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..e1def9a --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,37 @@ +name: Tests + + +on: + push: + branches: + - '**' + paths-ignore: + - '**.md' + - 'LICENSE' + - 'TODO' + - 'templates/**' + tags: + - '*' + workflow_dispatch: + + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Prerequisites + run: | + sudo apt update + sudo apt install git make g++ + + - name: Build + run: make + + - name: Install + run: sudo make install + + - name: Test + run: make test diff --git a/Makefile b/Makefile index 0710816..3facc19 100644 --- a/Makefile +++ b/Makefile @@ -19,4 +19,7 @@ uninstall: install: logfilegen install -m 0755 logfilegen $(prefix)/bin/logfilegen +test: + logfilegen --help + #.PHONY: install diff --git a/README.md b/README.md index 51a7472..d72c40a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ # logfilegen The server log file generator +[![Tests](../../actions/workflows/tests.yml/badge.svg)](../../actions/workflows/tests.yml) +[![Docker](../../actions/workflows/docker.yml/badge.svg)](../../actions/workflows/docker.yml) + + [Dockerhub repo](https://hub.docker.com/repository/docker/psemiletov/logfilegen/general)