Skip to content

fix CI coverage file artificats #962

fix CI coverage file artificats

fix CI coverage file artificats #962

Workflow file for this run

name: Test

Check failure on line 1 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yml

Invalid workflow file

You have an error in your yaml syntax
on:
push:
# branches: main
pull_request:
workflow_dispatch:
inputs:
debug:
description: 'Open ssh debug session.'
required: true
default: false
type: boolean
schedule:
- cron: '0 13 * * SUN' # Runs at 6 am pacific every sunday
env:
ENABLE_CI_ONLY_TESTS: "1"
jobs:
test-linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
django-version:
- '3.2' # LTS April 2024
- '4.2' # LTS April 2026
- '5.0' # April 2025
- '5.1' # December 2025
exclude:
- python-version: '3.9'
django-version: '5.0'
- python-version: '3.11'
django-version: '3.2'
- python-version: '3.12'
django-version: '3.2'
- python-version: '3.9'
django-version: '5.1'
- python-version: '3.13'
django-version: '3.2'
- python-version: '3.13'
django-version: '4.2'
- python-version: '3.13'
django-version: '5.0'
env:
COVERAGE_FILE: py${{ matrix.python-version }}-linux-dj${{ matrix.django-version }}.coverage
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Just
uses: extractions/setup-just@v2
- name: Install
run: |
just init
just install
just pin-dependency Django~=${{ matrix.django-version }}
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'true' }}
run: |
sudo apt install emacs
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
timeout-minutes: 60
- name: Run Unit Tests
run: |
just test-all
mv .coverage $COVERAGE_FILE
- name: Store coverage files
uses: actions/upload-artifact@v4
with:
name: ${{ env.COVERAGE_FILE }}
path: ${{ env.COVERAGE_FILE }}
test-windows:
runs-on: windows-latest
defaults:
run:
shell: pwsh
strategy:
matrix:
python-version: ['3.9', '3.13']
django-version:
- '3.2' # LTS April 2024
- '5.1' # December 2025
exclude:
- python-version: '3.9'
django-version: '5.1'
- python-version: '3.13'
django-version: '3.2'
env:
COVERAGE_FILE: py${{ matrix.python-version }}-windows-dj${{ matrix.django-version }}.coverage
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Just
uses: extractions/setup-just@v2
- name: Install
run: |
just init
just install
just pin-dependency Django~=${{ matrix.django-version }}
- name: Install VIM
if: ${{ github.event.inputs.debug == 'true' }}
uses: rhysd/action-setup-vim@v1
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
timeout-minutes: 60
- name: Run Unit Tests
run: |
just test-all
mv .coverage $COVERAGE_FILE
- name: Store coverage files
uses: actions/upload-artifact@v4
with:
name: ${{ env.COVERAGE_FILE }}
path: ${{ env.COVERAGE_FILE }}
test-macos:
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.9', '3.13']
django-version:
- '3.2' # LTS April 2024
- '5.1' # December 2025
exclude:
- python-version: '3.9'
django-version: '5.1'
- python-version: '3.13'
django-version: '3.2'
env:
COVERAGE_FILE: py${{ matrix.python-version }}-macos-dj${{ matrix.django-version }}.coverage
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Just
uses: extractions/setup-just@v2
- name: Set up Homebrew
if: ${{ github.event.inputs.debug == 'true' }}
uses: Homebrew/actions/setup-homebrew@master
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'true' }}
run: |
brew install emacs
- name: Install
run: |
just init
just install
just pin-dependency Django~=${{ matrix.django-version }}
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
timeout-minutes: 60
- name: Run Unit Tests
run: |
just test-all
mv .coverage $COVERAGE_FILE
- name: Store coverage files
uses: actions/upload-artifact@v4
with:
name: ${{ env.COVERAGE_FILE }}
path: ${{ env.COVERAGE_FILE }}
linux-bash-complete:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.13']
django-version:
- '3.2' # LTS April 2024
- '5.1' # December 2025
exclude:
- python-version: '3.9'
django-version: '5.1'
- python-version: '3.13'
django-version: '3.2'
env:
COVERAGE_FILE: linux-bash-py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Just
uses: extractions/setup-just@v2
- name: Install
run: |
just init
just install
just pin-dependency Django~=${{ matrix.django-version }}
# - name: Install Fish shell
# run: |
# sudo apt-get update
# sudo apt-get install -y fish
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'true' }}
run: |
sudo apt install emacs
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
timeout-minutes: 60
- name: Run Unit Tests
run: |
just test tests/shellcompletion/test_bash.py
mv .coverage $COVERAGE_FILE
- name: Store coverage files
uses: actions/upload-artifact@v4
with:
name: ${{ env.COVERAGE_FILE }}
path: ${{ env.COVERAGE_FILE }}
macos-zsh-complete:
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.9', '3.13']
django-version:
- '3.2' # LTS April 2024
- '5.1' # December 2025
exclude:
- python-version: '3.9'
django-version: '5.1'
- python-version: '3.13'
django-version: '3.2'
env:
COVERAGE_FILE: macos-zsh-py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Just
uses: extractions/setup-just@v2
- name: Install Homebrew and Zshell Completion
shell: zsh {0}
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
touch ~/.zshrc
(echo; echo 'eval "$(brew shellenv)"') >> ~/.zshrc
eval "$(brew shellenv)"
brew install zsh-completions
echo "if type brew &>/dev/null; then" >> ~/.zshrc
echo " FPATH=~/.zfunc:$(brew --prefix)/share/zsh-completions:$FPATH" >> ~/.zshrc
echo " autoload -Uz compinit" >> ~/.zshrc
echo " compinit" >> ~/.zshrc
echo "fi" >> ~/.zshrc
echo "fpath+=~/.zfunc" >> ~/.zshrc
chmod go-w /opt/homebrew/share
chmod -R go-w /opt/homebrew/share/zsh
source ~/.zshrc
sudo chsh -s /bin/zsh runner
# - name: Install Bash Completions
# shell: bash
# run: |
# brew install bash-completion@2
# touch ~/.bashrc
# echo "\n[[ -r "$(brew --prefix)/etc/profile.d/bash_completion.sh" ]] && . "$(brew --prefix)/etc/profile.d/bash_completion.sh" || true" >> ~/.bash_profile
# source ~/.bashrc
# - name: Install Fish shell
# run: |
# brew install sbt
# brew install fish
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'true' }}
run: |
brew install emacs
- name: Install
run: |
just init
just install
just pin-dependency Django~=${{ matrix.django-version }}
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
timeout-minutes: 60
- name: Run Unit Tests
shell: zsh {0}
run: |
just test tests/shellcompletion/test_zsh.py || exit 1
mv .coverage $COVERAGE_FILE
- name: Store coverage files
uses: actions/upload-artifact@v4
with:
name: ${{ env.COVERAGE_FILE }}
path: ${{ env.COVERAGE_FILE }}
windows-powershell-complete:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.9', '3.13']
django-version:
- '3.2' # LTS April 2024
- '5.0' # April 2025
exclude:
- python-version: '3.9'
django-version: '5.0'
- python-version: '3.13'
django-version: '3.2'
env:
COVERAGE_FILE: windows-powershell-py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Add to Poetry to PATH
run: echo "C:\Users\runneradmin\.local\bin" >> $env:GITHUB_PATH
shell: powershell
- name: Setup Just
uses: extractions/setup-just@v2
- name: Install Release Dependencies
run: |
just init
just install
just pin-dependency Django~=${{ matrix.django-version }}
shell: powershell
- name: Run Unit Tests
run: |
just test tests/shellcompletion/test_powershell.py
mv .coverage $COVERAGE_FILE
shell: powershell
- name: Store coverage files
uses: actions/upload-artifact@v4
with:
name: ${{ env.COVERAGE_FILE }}
path: ${{ env.COVERAGE_FILE }}
coverage-combine:
needs: [test-linux, test-windows, test-macos, linux-bash-complete, macos-zsh-complete, windows-powershell-complete]
runs-on: ubuntu-latest
steps:
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'true' }}
run: |
sudo apt install emacs
- name: Setup tmate session
if: ${{ github.event.inputs.debug == 'true' }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
timeout-minutes: 60
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Setup Just
uses: extractions/setup-just@v2
- name: Install Release Dependencies
run: |
just init
just install
- name: Get coverage files
uses: actions/download-artifact@v4
with:
pattern: *coverage
merge-multiple: true
- run: ls -la *.coverage
- run: just coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
verbose: true