Skip to content

Commit

Permalink
Merge branch 'main' into fl/rust
Browse files Browse the repository at this point in the history
  • Loading branch information
lemaitre-aneo committed Nov 6, 2024
2 parents 55297be + c83398e commit 62ae1d5
Show file tree
Hide file tree
Showing 10 changed files with 411 additions and 415 deletions.
29 changes: 29 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Motivation

[Include the reason behind these changes and any relevant context.]

# Description

[Provide a detailled explanation of the modifications you have made. Link any related issues.]

# Testing

[When applicable, detail the testing you have performed to ensure that these changes function as intended. Include information about any added tests.]

# Impact

[Discuss the impact of your modifications on ArmoniK. This might include effects on performance, configuration, documentation, new dependencies, or changes in behaviour.]

# Additional Information

[Any additional information that reviewers should be aware of.]

# Checklist

- [ ] My code adheres to the coding and style guidelines of the project.
- [ ] I have performed a self-review of my code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
- [ ] I have thoroughly tested my modifications and added tests when necessary.
- [ ] Tests pass locally and in the CI.
- [ ] I have assessed the performance impact of my modifications.
96 changes: 0 additions & 96 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,102 +301,6 @@ jobs:
- name: Build
run: nr build

build-test-python:
name: Build and test Python
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/python
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0

- name: pip update and add build package
run: bash proto2python.sh ~/pyvenv

- name: Install dependencies
run: pip install "$(echo pkg/armonik*.whl)[tests]"

- name: Generate certs
working-directory: packages/csharp/
shell: bash
run: |
mkdir certs
cd certs
../../../scripts/certs.sh
- name: Install certs
working-directory: packages/csharp/certs
run: |
sudo apt install ca-certificates
sudo mkdir -p /usr/local/share/ca-certificates/
sudo cp server2-ca.pem /usr/local/share/ca-certificates/ca.crt
sudo update-ca-certificates
- name: Build Mock server
working-directory: packages/csharp/ArmoniK.Api.Mock
shell: bash
run: |
dotnet publish -o ../out
[ -e ../out/ArmoniK.Api.Mock.exe ] || ln -s ArmoniK.Api.Mock ../out/ArmoniK.Api.Mock.exe
- name: Test
working-directory: packages/python/
shell: bash
run: |
set +e
set -x
export CertFolder="$PWD/../csharp/certs"
$PWD/../csharp/out/ArmoniK.Api.Mock.exe \
grpc:port=5000 http:port=4999 logging:loglevel:default="Warning" \
& notls_pid=$!
$PWD/../csharp/out/ArmoniK.Api.Mock.exe \
grpc:port=5001 http:port=5001 logging:loglevel:default="Warning" \
http:cert="$CertFolder/server1.pem" http:key="$CertFolder/server1.key" \
& tls_pid=$!
$PWD/../csharp/out/ArmoniK.Api.Mock.exe \
grpc:port=5002 http:port=5002 logging:loglevel:default="Warning" \
http:cert="$CertFolder/server2.pem" http:key="$CertFolder/server2.key" \
& tlsstore_pid=$!
$PWD/../csharp/out/ArmoniK.Api.Mock.exe \
grpc:port=5003 http:port=5003 logging:loglevel:default="Warning" \
http:cert="$CertFolder/server1.pem" http:key="$CertFolder/server1.key" http:clientcert="$CertFolder/client-ca.pem" \
& mtls_pid=$!
$PWD/../csharp/out/ArmoniK.Api.Mock.exe \
grpc:port=5004 http:port=5004 logging:loglevel:default="Warning" \
http:cert="$CertFolder/server2.pem" http:key="$CertFolder/server2.key" http:clientcert="$CertFolder/client-ca.pem" \
& mtlsstore_pid=$!
sleep 5
set -e
Grpc__Endpoint=http://localhost:5000 Http__Endpoint=http://localhost:4999 pytest tests --cov=armonik --cov-config=.coveragerc --cov-report=term-missing
Grpc__Endpoint=https://localhost:5001 Http__Endpoint=https://localhost:5001 Grpc__CaCert="$CertFolder/server1-ca.pem" pytest tests --cov=armonik --cov-config=.coveragerc --cov-report=term-missing --cov-append
Grpc__Endpoint=https://localhost:5002 Http__Endpoint=https://localhost:5002 pytest tests --cov=armonik --cov-config=.coveragerc --cov-report=term-missing --cov-append
Grpc__Endpoint=https://localhost:5003 Http__Endpoint=https://localhost:5003 Grpc__CaCert="$CertFolder/server1-ca.pem" Grpc__ClientCert="$CertFolder/client.pem" Grpc__ClientKey="$CertFolder/client.key" pytest tests --cov=armonik --cov-config=.coveragerc --cov-report=term-missing --cov-append
Grpc__Endpoint=https://localhost:5004 Http__Endpoint=https://localhost:5004 Grpc__ClientCert="$CertFolder/client.pem" Grpc__ClientKey="$CertFolder/client.key" pytest tests --cov=armonik --cov-config=.coveragerc --cov-report=term-missing --cov-append
Grpc__Endpoint=https://localhost:5004 Http__Endpoint=https://localhost:5004 Grpc__ClientCert="$CertFolder/client-client.pem" pytest tests --cov=armonik --cov-config=.coveragerc --cov-report=term-missing --cov-append
Grpc__Endpoint=https://localhost:5004 Http__Endpoint=https://localhost:5004 Grpc__ClientCert="$CertFolder/client.p12" pytest tests --cov=armonik --cov-config=.coveragerc --cov-report=term-missing --cov-append --cov-report xml:coverage.xml --cov-report html:coverage_report
set +e
kill $notls_pid $tls_pid $tlsstore_pid $mtls_pid $mtlsstore_pid
exit $ret
- name: Get Cover
uses: orgoro/coverage@3f13a558c5af7376496aa4848bf0224aead366ac
with:
coverageFile: packages/python/coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}

- name: Archive code coverage results html
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
with:
name: code-coverage-report-html
path: packages/python/coverage_report

- name: Archive code coverage results xml
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
with:
name: code-coverage-report-xml
path: packages/python/coverage.xml

build-cpp-packages:
strategy:
fail-fast: false
Expand Down
Loading

0 comments on commit 62ae1d5

Please sign in to comment.