-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: Add workflows * fix * fix coverage report * clone repo --------- Co-authored-by: Massimiliano Pippi <[email protected]>
- Loading branch information
Showing
13 changed files
with
262 additions
and
189 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# See https://help.github.com/articles/about-codeowners/ for syntax | ||
|
||
# Core Engineering will be the default owners for everything | ||
# in the repo. Unless a later match takes precedence, | ||
# @deepset-ai/core-engineering will be requested for review | ||
# when someone opens a pull request. | ||
* @deepset-ai/open-source-engineering | ||
|
||
# Documentation | ||
*.md @deepset-ai/documentation @deepset-ai/open-source-engineering | ||
releasenotes/notes/* @deepset-ai/documentation @deepset-ai/open-source-engineering |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
schedule: | ||
interval: 'daily' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
### Related Issues | ||
|
||
- fixes #issue-number | ||
|
||
### Proposed Changes: | ||
|
||
<!--- In case of a bug: Describe what caused the issue and how you solved it --> | ||
<!--- In case of a feature: Describe what did you add and how it works --> | ||
|
||
### How did you test it? | ||
|
||
<!-- unit tests, integration tests, manual verification, instructions for manual tests --> | ||
|
||
### Notes for the reviewer | ||
|
||
<!-- E.g. point out section where the reviewer --> | ||
|
||
### Checklist | ||
|
||
- I have read the [contributors guidelines](https://github.com/deepset-ai/haystack/blob/main/CONTRIBUTING.md) and the [code of conduct](https://github.com/deepset-ai/haystack/blob/main/code_of_conduct.txt) | ||
- I have updated the related issue with new insights and changes | ||
- I added unit tests and updated the docstrings | ||
- I've used one of the [conventional commit types](https://www.conventionalcommits.org/en/v1.0.0/) for my PR title: `fix:`, `feat:`, `build:`, `chore:`, `ci:`, `docs:`, `style:`, `refactor:`, `perf:`, `test:`. | ||
- I documented my code | ||
- I ran [pre-commit hooks](https://github.com/deepset-ai/haystack/blob/main/CONTRIBUTING.md#installation) and fixed any issue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Licensing | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "haystack_experimental/**/*.py" | ||
- "test/**/*.py" | ||
- "pyproject.toml" | ||
|
||
jobs: | ||
license-header: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check License Header | ||
run: docker run --rm -v "$(pwd):/github/workspace" ghcr.io/korandoru/hawkeye check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Track issues with Github project | ||
|
||
on: | ||
issues: | ||
types: | ||
- opened | ||
|
||
jobs: | ||
add-to-project: | ||
name: Add new issues to project for triage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
project-url: https://github.com/orgs/deepset-ai/projects/5 | ||
github-token: ${{ secrets.GH_PROJECT_PAT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Project release on PyPi | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+*" | ||
|
||
env: | ||
HATCH_VERSION: "1.9.4" | ||
|
||
jobs: | ||
release-on-pypi: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Hatch | ||
run: pip install hatch==${{ env.HATCH_VERSION }} | ||
|
||
- name: Build Haystack Experimental | ||
run: hatch build | ||
|
||
- name: Publish on PyPi | ||
env: | ||
HATCH_INDEX_USER: __token__ | ||
HATCH_INDEX_AUTH: ${{ secrets.HAYSTACK_AI_PYPI_TOKEN }} | ||
run: hatch publish -y | ||
|
||
- name: Notify Slack | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
VERSION: ${{ github.ref_name }} | ||
if: always() | ||
uses: act10ns/slack@v2 | ||
with: | ||
status: ${{ job.status }} | ||
channel: "#haystack-notifications" | ||
config: .github/config/pypi-release-slack-notification.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# If you change this name also do it in tests_skipper.yml and ci_metrics.yml | ||
name: Tests | ||
|
||
on: | ||
# Activate this workflow manually | ||
workflow_dispatch: | ||
|
||
# Run tests nightly against Haystack's main branch | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
paths: | ||
# Keep the list in sync with the paths defined in the `tests_skipper.yml` workflow | ||
- "haystack_experimental/**/*.py" | ||
- "test/**/*.py" | ||
- "pyproject.toml" | ||
|
||
env: | ||
PYTHON_VERSION: "3.8" | ||
HATCH_VERSION: "1.9.4" | ||
|
||
jobs: | ||
linting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Hatch | ||
run: pip install hatch==${{ env.HATCH_VERSION }} | ||
|
||
- name: Check code format | ||
run: hatch fmt | ||
|
||
- name: Linting | ||
run: hatch run test:lint | ||
|
||
- name: Typing | ||
run: hatch run test:typing | ||
|
||
unit-tests: | ||
name: Unit / ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
- macos-latest | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "${{ env.PYTHON_VERSION }}" | ||
|
||
- name: Install Hatch | ||
run: pip install hatch==${{ env.HATCH_VERSION }} | ||
|
||
- name: Run | ||
run: hatch run test:cov | ||
|
||
- name: Coveralls | ||
# We upload only coverage for ubuntu as handling both os | ||
# complicates the workflow too much for little to no gain | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
path-to-lcov: coverage.xml | ||
|
||
- name: Nightly - run unit tests with Haystack main branch | ||
if: github.event_name == 'schedule' | ||
id: nightly-haystack-main | ||
run: | | ||
hatch run pip install git+https://github.com/deepset-ai/haystack.git | ||
hatch run test:unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Github workflows linter | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- ".github/workflows" | ||
|
||
jobs: | ||
lint-workflows: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install actionlint | ||
run: go install github.com/rhysd/actionlint/cmd/actionlint@latest | ||
|
||
- name: Run actionlint | ||
run: actionlint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# SPDX-FileCopyrightText: 2022-present deepset GmbH <[email protected]> | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.