From 08ecef3a162067e167b2111ebbdabf72ae3cd94f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20Dupr=C3=A9?= Date: Tue, 3 Oct 2023 23:00:13 +0200 Subject: [PATCH] Fix check release action (#91) * fix pipeline * add path * vesion * action * fix yml * action * change order * remove windows * action * action --- .github/workflows/check-release.yml | 61 ++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml index ca94a920..06a1d934 100644 --- a/.github/workflows/check-release.yml +++ b/.github/workflows/check-release.yml @@ -4,26 +4,77 @@ on: schedule: # every first day of the month - cron: '0 0 1 * *' + push: + jobs: - mypy: - runs-on: ubuntu-latest + + release-linux-mac: + strategy: + matrix: + os: [ubuntu-latest, macOS-latest] + python-version: ['3.11', '3.10'] + runs-on: ${{ matrix.os }} steps: - - name: git checkout + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install onnx-extended + run: pip install onnx-extended + - name: Version + run: | + python -c "import onnx_extended;print(onnx_extended.__version__)" + - name: Installation path + run: python -c "import onnx_extended;print(onnx_extended.__file__)" + - name: git checkout run: | git init git remote add -f origin https://github.com/sdpython/onnx-extended.git git config core.sparsecheckout true echo _unittests/ >> .git/info/sparse-checkout + echo _doc/examples/ >> .git/info/sparse-checkout + echo pyproject.toml >> .git/info/sparse-checkout echo requirements-dev.txt >> .git/info/sparse-checkout git pull origin main + VERSION=$(python -c "import onnx_extended;print(onnx_extended.__version__)") + git checkout tags/${VERSION} -b thistag - name: ls run: ls . + - name: Install requirements + run: pip install -r requirements-dev.txt + - name: Run pytest + run: pytest _unittests --ignore-glob=**LONG*.py + + release-windows: + strategy: + matrix: + os: [windows-latest] + python-version: ['3.11', '3.10'] + runs-on: ${{ matrix.os }} + steps: - uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: ${{ matrix.python-version }} - name: Install onnx-extended run: pip install onnx-extended - - name: Install + - name: Version + run: | + python -c "import onnx_extended;print(onnx_extended.__version__)" + - name: Installation path + run: python -c "import onnx_extended;print(onnx_extended.__file__)" + - name: git checkout + run: | + git init + git remote add -f origin https://github.com/sdpython/onnx-extended.git + git config core.sparsecheckout true + echo _unittests/ >> .git\info\sparse-checkout + echo _doc/examples/ >> .git\info\sparse-checkout + echo pyproject.toml >> .git\info\sparse-checkout + echo requirements-dev.txt >> .git/info/sparse-checkout + git pull origin main + git checkout tags/0.2.2 -b thistag + - name: ls + run: ls . + - name: Install requirements run: pip install -r requirements-dev.txt - name: Run pytest run: pytest _unittests --ignore-glob=**LONG*.py