diff --git a/.gitea/workflows/test-go.yaml b/.gitea/workflows/test-go.yaml new file mode 100644 index 0000000..19a532f --- /dev/null +++ b/.gitea/workflows/test-go.yaml @@ -0,0 +1,20 @@ +on: + push: + paths: + - 'src/simple-ca/**' + +jobs: + test-go: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: stable + + - name: Run Go tests + run: go test -v ./... + working-directory: src/simple-ca diff --git a/.gitea/workflows/test-python.yaml b/.gitea/workflows/test-python.yaml new file mode 100644 index 0000000..789137f --- /dev/null +++ b/.gitea/workflows/test-python.yaml @@ -0,0 +1,23 @@ +on: + push: + paths: + - 'simple-ca.py' + - 'test_simple_ca.py' + +jobs: + test-python: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Install pytest + run: pip install pytest + + - name: Run python tests + run: python3 -m pytest test_simple_ca.py -v diff --git a/.gitea/workflows/test-shell.yaml b/.gitea/workflows/test-shell.yaml new file mode 100644 index 0000000..c6524af --- /dev/null +++ b/.gitea/workflows/test-shell.yaml @@ -0,0 +1,15 @@ +on: + push: + paths: + - 'simple-ca.sh' + - 'run-tests.sh' + +jobs: + test-shell: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Run shell tests + run: bash run-tests.sh diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml deleted file mode 100644 index f8af549..0000000 --- a/.gitea/workflows/test.yaml +++ /dev/null @@ -1,51 +0,0 @@ -on: - push: - paths: - - 'simple-ca.sh' - - 'simple-ca.py' - - 'run-tests.sh' - - 'test_simple_ca.py' - - 'src/simple-ca/**' - - '.gitea/workflows/test.yaml' - -jobs: - test-python: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v6 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - name: Install pytest - run: pip install pytest - - - name: Run python tests - run: python3 -m pytest test_simple_ca.py -v - - test-shell: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v6 - - - name: Run shell tests - run: bash run-tests.sh - - test-go: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v6 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: stable - - - name: Run Go tests - run: go test -v ./... - working-directory: src/simple-ca diff --git a/README.md b/README.md index 9c9742a..f655a33 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Simple CA -[![test](https://gitea.koszewscy.waw.pl/slawek/simple-ca/actions/workflows/test.yaml/badge.svg)](https://gitea.koszewscy.waw.pl/slawek/simple-ca/actions?workflow=test.yaml) +[![shell](https://gitea.koszewscy.waw.pl/slawek/simple-ca/actions/workflows/test-shell.yaml/badge.svg)](https://gitea.koszewscy.waw.pl/slawek/simple-ca/actions?workflow=test-shell.yaml) +[![python](https://gitea.koszewscy.waw.pl/slawek/simple-ca/actions/workflows/test-python.yaml/badge.svg)](https://gitea.koszewscy.waw.pl/slawek/simple-ca/actions?workflow=test-python.yaml) +[![go](https://gitea.koszewscy.waw.pl/slawek/simple-ca/actions/workflows/test-go.yaml/badge.svg)](https://gitea.koszewscy.waw.pl/slawek/simple-ca/actions?workflow=test-go.yaml) Tools for creating and managing a simple Certificate Authority for testing and development. Three implementations are provided — pick whichever fits your environment: