Skip to content

Implement PackNet #1705

Implement PackNet

Implement PackNet #1705

################################################################################
# Copyright (c) 2021 ContinualAI. #
# Copyrights licensed under the MIT License. #
# See the accompanying LICENSE file for terms. #
# #
# Date: 14-03-2021 #
# Author(s): Gabriele Graffieti #
# E-mail: [email protected] #
# Website: avalanche.continualai.org #
################################################################################
name: docstring coverage
on:
push:
paths:
- '**.py'
- '.github/workflows/docstring-coverage.yml'
pull_request:
paths:
- '**.py'
- '.github/workflows/docstring-coverage.yml'
jobs:
build:
name: docstring coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
architecture: x64
- name: Install and use interrogate
run: |
pip install interrogate &&
interrogate avalanche -vv --generate-badge interrogate-badge.svg -o documentation-coverage.txt
- name: clone reports repository
if: github.event_name == 'push' && github.repository == 'ContinualAI/avalanche'
uses: actions/checkout@v2
with:
repository: 'ContinualAI/avalanche-report'
ref: main
path: 'avalanche-reports'
token: ${{ secrets.REPORT_TOKEN }}
- name: commit badge
if: github.event_name == 'push' && github.repository == 'ContinualAI/avalanche'
run: |
mv interrogate-badge.svg avalanche-reports/badge/ &&
mv documentation-coverage.txt avalanche-reports/docstring_coverage/ &&
cd avalanche-reports &&
git config --local user.email ${{ secrets.EMAIL }} &&
git config --local user.name ${{ secrets.NAME }} &&
git pull &&
git add . &&
git commit -m "Update coverage badge" -a || true
- name: Push changes
if: github.event_name == 'push' && github.repository == 'ContinualAI/avalanche'
continue-on-error: true
uses: ad-m/github-push-action@master
with:
repository: ContinualAI/avalanche-report
branch: main
directory: avalanche-reports
github_token: ${{ secrets.REPORT_TOKEN }}