From c2550ae38c3e94d180c1018b10e2ab05b1433963 Mon Sep 17 00:00:00 2001 From: Simeon Ehrig Date: Mon, 25 Sep 2023 15:02:54 +0200 Subject: [PATCH] move formatter job to GitHub Actions --- .github/workflows/formatter.yaml | 16 ++++++++++++++++ .gitlab-ci.yml | 14 -------------- 2 files changed, 16 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/formatter.yaml diff --git a/.github/workflows/formatter.yaml b/.github/workflows/formatter.yaml new file mode 100644 index 0000000..3a98451 --- /dev/null +++ b/.github/workflows/formatter.yaml @@ -0,0 +1,16 @@ +name: formatter +on: [pull_request] +jobs: + formatter: + runs-on: ubuntu-latest + steps: + - name: checkout repo + uses: actions/checkout@v4 + - name: install Julia + uses: julia-actions/setup-julia@v1 + with: + version: 1.9 + - name: Install Julia requirements + run: julia --project=${GITHUB_WORKSPACE}/.formatting -e 'import Pkg; Pkg.instantiate()' + - name: Check code style + run: julia --project=${GITHUB_WORKSPACE}/.formatting ${GITHUB_WORKSPACE}/.formatting/format_all.jl diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bc1b28b..a50e60a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,23 +1,9 @@ stages: - - linter - unit-test - generate_integration_test - run_integration_test - verify-unit-test-deps -format: - stage: linter - image: julia:1.9 - script: - - "[[ -d .julia ]] && mv .julia /tmp" - - julia --project=.formatting -e 'import Pkg; Pkg.instantiate()' - - julia --project=.formatting .formatting/format_all.jl - - "[[ -d /tmp/.julia ]] && mv /tmp/.julia ." - variables: - CI_JULIA_VERSION: "1.9" - JULIA_DEPOT_PATH: /tmp/.julia - allow_failure: true - unit_tests_julia1.9: image: julia:1.9 stage: unit-test