From ffe630b5952a4ab57eff53a5d1924dc135333900 Mon Sep 17 00:00:00 2001 From: Valentin Gauthier Date: Thu, 4 Apr 2024 01:32:17 +0200 Subject: [PATCH] ci --- .../ci-energyml-utils-pull-request.yml | 47 ++----------------- .../workflow/ci-energyml-utils-release.yml | 0 2 files changed, 4 insertions(+), 43 deletions(-) rename {energyml-utils/.github => .github}/workflow/ci-energyml-utils-pull-request.yml (59%) rename {energyml-utils/.github => .github}/workflow/ci-energyml-utils-release.yml (100%) diff --git a/energyml-utils/.github/workflow/ci-energyml-utils-pull-request.yml b/.github/workflow/ci-energyml-utils-pull-request.yml similarity index 59% rename from energyml-utils/.github/workflow/ci-energyml-utils-pull-request.yml rename to .github/workflow/ci-energyml-utils-pull-request.yml index 432f123..8431502 100644 --- a/energyml-utils/.github/workflow/ci-energyml-utils-pull-request.yml +++ b/.github/workflow/ci-energyml-utils-pull-request.yml @@ -14,6 +14,7 @@ on: jobs: build: + working_directory: energyml-utils name: Build distribution runs-on: ubuntu-latest steps: @@ -23,13 +24,8 @@ jobs: with: fetch-depth: 0 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.9' - - name: Install poetry - uses: ../.github/actions/prepare-poetry + uses: .github/actions/prepare-poetry with: python-version: 3.9 @@ -45,43 +41,8 @@ jobs: name: dist-artifact path: dist/ - test: - name: Test - needs: build - runs-on: ubuntu-latest - steps: - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Get build artifacts - uses: actions/download-artifact@v3 - with: - name: dist-artifact - path: dist/ - - - name: Install from build - run: | - python -m pip install --upgrade pip - pip install pytest-mock - pip install etpproto --pre --target=dist --find-links=dist/ - - - name: Copy tests and example data to dist folder for testing against artifacts - run: | - cp -R tests dist/ - # cp -R example_data dist/ - - - name: Run tests - run: pytest dist/tests - publish: + working_directory: energyml-utils name: Publish to PyPI needs: [build, test] runs-on: ubuntu-latest @@ -100,7 +61,7 @@ jobs: path: dist/ - name: Install poetry - uses: ../.github/actions/prepare-poetry + uses: .github/actions/prepare-poetry with: python-version: 3.9 diff --git a/energyml-utils/.github/workflow/ci-energyml-utils-release.yml b/.github/workflow/ci-energyml-utils-release.yml similarity index 100% rename from energyml-utils/.github/workflow/ci-energyml-utils-release.yml rename to .github/workflow/ci-energyml-utils-release.yml