Skip to content

Setup AppMap Analysis #19

Setup AppMap Analysis

Setup AppMap Analysis #19

name: appmap-analysis
on:
pull_request:
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, 18]
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: Save AppMaps
uses: actions/cache/save@v3
if: always()
with:
path: .appmap/archive/full/${{ matrix.group }}.tar
key: appmaps-${{ github.sha }}-${{ github.run_attempt }}
appmap-analysis:
if: always()
runs-on: ubuntu-latest
needs: [ record-appmaps ]
steps:
- uses: actions/checkout@v3
- name: Install AppMap tools
uses: getappmap/install-action@v1
with:
install-appmap-library: false
- name: Restore AppMaps in Cache
uses: actions/cache/restore@v3
with:
path: .appmap/archive/full/
key: appmaps-${{ github.sha }}-${{ github.run_attempt }}
- name: Merge AppMaps
uses: getappmap/archive-action/merge@v1
with:
revision: ${{ github.event.pull_request.base.sha }}
archive-count: 18
- name: Archive AppMaps
uses: getappmap/archive-action@v1
with:
revision: ${{ github.event.pull_request.base.sha }}