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

Setup AppMap Analysis #1

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .github/workflows/appmap-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: appmap-analysis

on:
pull_request:
push:
branches:
- master
schedule:
- cron: '0 0 * * 0'

jobs:
record-appmaps:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]

services:
postgres:
image: postgres:15
env:
POSTGRES_USER: misago
POSTGRES_PASSWORD: misago
POSTGRES_DB: misago
ports:
- 5432:5432

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install AppMap tools
id: install-appmap
uses: getappmap/install-action@v1
with:
project-type: pip
build-file: "requirements.txt"

- name: Pytest
env:
DJANGO_SETTINGS_MODULE: devproject.test_settings
POSTGRES_DB: misago
POSTGRES_USER: misago
POSTGRES_PASSWORD: misago
POSTGRES_HOST: localhost
run: |
pytest --no-cov --splits 18 --group ${{ matrix.group }}

- name: Set matrix group env var with zero-based numbering
if: always()
id: set-matrix-group-var
env:
NUM: ${{ matrix.group }}
run: |
echo "ARCHIVE_ID=$(($NUM - 1))" >> $GITHUB_OUTPUT

- name: Delete Request AppMaps
if: always()
run: |
rm -rfv tmp/appmap/requests

- name: Save AppMap archive
if: always()
uses: getappmap/archive-action@v1
with:
archive-id: ${{ steps.set-matrix-group-var.outputs.ARCHIVE_ID }}

appmap-analysis:
if: always()
needs: [record-appmaps]
uses: getappmap/analyze-action/.github/workflows/appmap-analysis-matrix.yml@v1
with:
archive-count: 17
permissions:
actions: read
contents: read
checks: write
pull-requests: write
36 changes: 0 additions & 36 deletions .github/workflows/publish.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/tests.yml

This file was deleted.

8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,10 @@ pylint.txt
*.pot

# Docker Compose Override
docker-compose.override.yml
docker-compose.override.yml

tmp/appmap
test

# Ignore AppMap archives and working files
/.appmap
Loading
Loading