Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Use a gist to store integration test results #934

Merged
merged 6 commits into from Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 0 additions & 20 deletions .github/badges/integration-5-apache-postgres.svg

This file was deleted.

20 changes: 0 additions & 20 deletions .github/badges/integration-6-apache-mysql.svg

This file was deleted.

20 changes: 0 additions & 20 deletions .github/badges/integration-6-apache-postgres.svg

This file was deleted.

20 changes: 0 additions & 20 deletions .github/badges/integration-develop-postgres.svg

This file was deleted.

20 changes: 0 additions & 20 deletions .github/badges/integration-master-postgres.svg

This file was deleted.

46 changes: 14 additions & 32 deletions .github/workflows/tests.yml
Expand Up @@ -244,41 +244,23 @@ jobs:
path: ".coverage.*"

- name: Update integration status badge
if: always() && matrix.session == 'integration' && github.event_name == 'push' && github.ref == 'refs/heads/main'
if: always() && matrix.session == 'integration'
id: badge
uses: emibcn/badge-action@v2.0.2
with:
label: LimeSurvey Integration (${{ matrix.image_tag || matrix.ref }}, ${{ matrix.database }})
status: ${{ steps.nox.outcome }}
color: ${{ steps.nox.outcome == 'success' && 'green' || 'red' }}
path: .github/badges/integration-${{ matrix.image_tag || matrix.ref }}-${{ matrix.database }}.svg

- name: Upload badges
run: >
echo '{
"schemaVersion": 1,
"label": "${{ matrix.image_tag || matrix.ref }}, ${{ matrix.database }}",
"message": "${{ steps.nox.outcome }}",
"color": "${{ steps.nox.outcome == 'success' && 'green' || 'red' }}"
}' > badge-integration-${{ matrix.python-version }}-${{ matrix.image_tag || matrix.ref }}-${{ matrix.database }}.json

- name: Deploy integration status badge
uses: exuanbo/actions-deploy-gist@v1
if: always() && steps.badge.outcome == 'success'
uses: actions/upload-artifact@v3.1.2
with:
name: badges
path: .github/badges

badges:
name: Update badges
if: always() && github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: tests
steps:
- name: Check out the repository
uses: actions/checkout@v3.5.3

- name: Download badges
uses: actions/download-artifact@v3.0.2
with:
name: badges
path: .github/badges

- name: Commit and push changes
uses: EndBug/add-and-commit@v7
with:
add: ".github/badges"
token: ${{ secrets.GIST_TOKEN }}
gist_id: 02f3c72747cc609788c75c3cd32b4e97
file_path: badge-integration-${{ matrix.python-version }}-${{ matrix.image_tag || matrix.ref }}-${{ matrix.database }}.json

types:
name: Type checking
Expand Down
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Expand Up @@ -4,8 +4,6 @@ ci:
autoupdate_schedule: monthly
autoupdate_commit_msg: 'chore(deps): pre-commit autoupdate'

exclude: ^\.github\/badges\/.*$

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
Expand Down
11 changes: 11 additions & 0 deletions README.md
Expand Up @@ -56,6 +56,17 @@ Python.
- Easily [download survey files](https://citric.readthedocs.io/en/stable/how-to.html#get-files-uploaded-to-a-survey-and-move-them-to-s3) (e.g. images, audio, etc.) to a local directory.
- Tested against LimeSurvey 6.0.0+ and 5.0.0+ LTS versions.

### Integration tests

| LimeSurvey version | Database | Status |
| ----------------------| ---------- | ------ |
| Latest 6 | PostgreSQL | ![Status of 6+ integration tests, postgres](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fedgarrmondragon%2F02f3c72747cc609788c75c3cd32b4e97%2Fraw%2Fbadge-integration-3.11-6-apache-postgres.json) |
| Latest 6 | MySQL | ![Status of 6+ integration tests, mysql](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fedgarrmondragon%2F02f3c72747cc609788c75c3cd32b4e97%2Fraw%2Fbadge-integration-3.11-6-apache-mysql.json) |
| 6.2.1+230807 | PostgreSQL | ![Status of 6+ integration tests, postgres](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fedgarrmondragon%2F02f3c72747cc609788c75c3cd32b4e97%2Fraw%2Fbadge-integration-3.11-6.2.1-230807-apache-postgres.json) |
| Latest 5 | PostgreSQL | ![Status of 5+ integration tests, postgres](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fedgarrmondragon%2F02f3c72747cc609788c75c3cd32b4e97%2Fraw%2Fbadge-integration-3.11-5-apache-postgres.json) |
| `master` | PostgreSQL | ![Status of master branch integration tests, postgres](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fedgarrmondragon%2F02f3c72747cc609788c75c3cd32b4e97%2Fraw%2Fbadge-integration-3.11-master-postgres.json) |
| `develop` | PostgreSQL | ![Status of develop branch integration tests, postgres](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fedgarrmondragon%2F02f3c72747cc609788c75c3cd32b4e97%2Fraw%2Fbadge-integration-3.11-develop-postgres.json) |

## Installation

```console
Expand Down