Skip to content

Merge pull request #35 from monobilisim/windows #885

Merge pull request #35 from monobilisim/windows

Merge pull request #35 from monobilisim/windows #885

Workflow file for this run

name: CI
permissions:
contents: read
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@main
with:
go-version: stable
- run: |
sudo apt update
sudo apt install -y protobuf-compiler
make install-deps
export PATH=$PATH:$HOME/go/bin
make gen-health-plugin-proto
make build-plugins
sudo mkdir -p /var/lib/monokit/plugins
sudo cp -r plugins/* /var/lib/monokit/plugins/
make with-api
- name: Run unit tests for the API
run: |
make test-with-api
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.html
- name: Create required instances
env:
REDMINE_TEST_API_KEY: ${{ secrets.REDMINE_TEST_API_KEY }}
REDMINE_TEST_SQL_DUMP: ${{ secrets.REDMINE_TEST_SQL_DUMP }}
run: tests/init.sh
- name: issue/create.sh
run: |
if ! sudo bash -xe tests/redmine/issue/create.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: issue/update.sh
run: |
if ! sudo bash -xe tests/redmine/issue/update.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: issue/close.sh
run: |
if ! sudo bash -xe tests/redmine/issue/close.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: issue/down.sh
run: |
if ! sudo bash -xe tests/redmine/issue/down.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: issue/up.sh
run: |
if ! sudo bash -xe tests/redmine/issue/up.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: news/create.sh
run: |
if ! sudo bash -xe tests/redmine/news/create.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: news/delete.sh
run: |
if ! sudo bash -xe tests/redmine/news/delete.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: health/osHealth/redmine.sh
run: |
if ! sudo bash -xe tests/health/osHealth/redmine.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: health/osHealth/redmine-ram.sh
run: |
if ! sudo bash -xe tests/health/osHealth/redmine-ram.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: health/rmqHealth/init-rmq.sh
run: |
if ! sudo bash -xe tests/health/rmqHealth/init-rmq.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: health/rmqHealth/test.sh
run: |
if ! sudo bash -xe tests/health/rmqHealth/test.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: health/k8sHealth/init-k8s.sh
run: |
if ! sudo bash -xe tests/health/k8sHealth/init-k8s.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: health/k8sHealth/test.sh
run: |
if ! sudo bash -xe tests/health/k8sHealth/test.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: health/pgsqlHealth/init-pgsql.sh
run: |
if ! sudo bash -xe tests/health/pgsqlHealth/init-pgsql.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: health/pgsqlHealth/test.sh
run: |
if ! sudo bash -xe tests/health/pgsqlHealth/test.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: health/redisHealth/init-redis.sh
run: |
if ! sudo bash -xe tests/health/redisHealth/init-redis.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: health/redisHealth/test.sh
run: |
if ! sudo bash -xe tests/health/redisHealth/test.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: health/mysqlHealth/init-mysql.sh
run: |
if ! sudo bash -xe tests/health/mysqlHealth/init-mysql.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: health/mysqlHealth/test.sh
run: |
if ! sudo bash -xe tests/health/mysqlHealth/test.sh; then
cat /var/log/monokit.log
exit 1
fi
- name: api/init.sh
run: |
if ! sudo bash -xe tests/api/init.sh; then
cat /var/log/monokit.log
exit 1
fi