From c519893e7146c1be30537afb5acef3eb4f140b8d Mon Sep 17 00:00:00 2001 From: paugier Date: Sat, 20 Jan 2024 23:24:54 +0100 Subject: [PATCH] More nox + release in CI + Github Actions --- .github/workflows/ci-linux.yml | 35 ++++++++++++++++++++++++++ .gitlab-ci.yml | 45 ++++++++++++++++++++++++++++++---- noxfile.py | 13 +++++++++- 3 files changed, 87 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/ci-linux.yml diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml new file mode 100644 index 0000000..79a54b3 --- /dev/null +++ b/.github/workflows/ci-linux.yml @@ -0,0 +1,35 @@ +name: CI Linux + +on: + - push + - pull_request + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + + steps: + - name: apt install + run: | + sudo apt install -y openfoam + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pdm nox + - name: Test + run: | + nox -s test + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: false # optional (default = false) + verbose: true # optional (default = false) + files: coverage.xml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f8eb4f5..446f4d0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,20 +5,20 @@ variables: WM_PROJECT_DIR: "/usr/share/openfoam" OMPI_ALLOW_RUN_AS_ROOT: "1" OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: "1" + PDM_CACHE_DIR: ${CI_PROJECT_DIR}/.pdm-cache stages: - image - test - publish + - build + - release cache: # Required to keep artifacts from old builds, e.g. from default paths: - public -before_script: - - pdm install - # Build an image for the above tasks; this should be a scheduled job, as # it is quite unnecessary to run on every invocation. @@ -32,8 +32,6 @@ CI image: image: name: gcr.io/kaniko-project/executor:debug entrypoint: [ "" ] - before_script: - - "" script: - | cat > /kaniko/.docker/config.json <