mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 20:25:34 -05:00
92 lines
2.9 KiB
YAML
92 lines
2.9 KiB
YAML
name: hdk PR checks
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
concurrency:
|
|
group: ${{ github.head_ref }}
|
|
cancel-in-progress: true
|
|
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.8]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Cache Installation Files
|
|
uses: actions/cache@v2
|
|
with:
|
|
# Paths are Unix specific for now
|
|
path: |
|
|
~/.cache/pip
|
|
~/.cache/pypoetry
|
|
# Ignore line break in the evaluated double quoted string
|
|
key: "${{ runner.os }}-build-${{ matrix.python-version }}-\
|
|
${{ hashFiles('poetry.lock') }}"
|
|
restore-keys: |
|
|
${{ runner.os }}-build-${{ matrix.python-version }}-
|
|
${{ runner.os }}-build-
|
|
${{ runner.os }}-
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install poetry
|
|
make setup_env
|
|
- name: Conformance
|
|
id: conformance
|
|
if: ${{ success() && !cancelled() }}
|
|
run: |
|
|
make pcc
|
|
- name: PyTest
|
|
id: pytest
|
|
if: ${{ steps.conformance.outcome == 'success' && !cancelled() }}
|
|
run: |
|
|
make pytest
|
|
- name: Test coverage
|
|
id: coverage
|
|
if: ${{ steps.pytest.outcome != 'skipped' && !cancelled() }}
|
|
run: |
|
|
bash --noprofile --norc -o pipefail \
|
|
script/actions_utils/coverage.sh ${{ github.base_ref }}
|
|
- name: Archive test coverage
|
|
uses: actions/upload-artifact@v2
|
|
if: ${{ steps.coverage.outcome != 'skipped' && !cancelled() }}
|
|
with:
|
|
name: coverage
|
|
path: coverage.html
|
|
- name: Comment with coverage
|
|
uses: marocchino/sticky-pull-request-comment@v2
|
|
if: ${{ steps.coverage.outcome != 'skipped' && !cancelled() }}
|
|
with:
|
|
path: diff-coverage.txt
|
|
recreate: true
|
|
- name: Build docs
|
|
id: docs
|
|
if: ${{ steps.conformance.outcome == 'success' && !cancelled() }}
|
|
run: |
|
|
make docs
|
|
- name: Archive docs artifacts
|
|
if: ${{ steps.docs.outcome == 'success' && !cancelled() }}
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: html-docs
|
|
path: docs/_build/html
|
|
- name: Slack Notification
|
|
if: ${{ always() }}
|
|
uses: rtCamp/action-slack-notify@v2
|
|
env:
|
|
SLACK_CHANNEL: hdk-updates
|
|
SLACK_ICON: https://pbs.twimg.com/profile_images/1274014582265298945/OjBKP9kn_400x400.png
|
|
SLACK_COLOR: ${{ job.status }}
|
|
SLACK_MESSAGE: 'Build finished with status ${{ job.status }}'
|
|
SLACK_USERNAME: zama-bot
|
|
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|