From da42f0d42bea6dabc144809a0b3d6314a7b267d4 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 17 May 2022 13:14:08 +0300 Subject: [PATCH] ci: add an early step 'All code is formatted' to more workflows. --- .github/workflows/alpine.test.sh | 2 ++ .github/workflows/ci.yml | 19 +++++++++++++++++-- .github/workflows/containers_ci.yml | 7 +++++++ .github/workflows/debug_ci.yml | 5 +++-- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/.github/workflows/alpine.test.sh b/.github/workflows/alpine.test.sh index e3cd164d7..9c67c7de1 100755 --- a/.github/workflows/alpine.test.sh +++ b/.github/workflows/alpine.test.sh @@ -15,6 +15,8 @@ ls -lat ## try running the known failing tests first to get faster feedback ./v test vlib/builtin/string_test.v vlib/strings/builder_test.v +./v test-cleancode + ./v test-self ./v build-vbinaries diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fcca993f4..61b36441c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,6 +55,8 @@ jobs: echo $VFLAGS ./v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works + - name: All code is formatted + run: ./v test-cleancode - name: Self tests run: ./v test-self # - name: Self tests (-cstrict) @@ -126,6 +128,8 @@ jobs: run: | ./v -gc boehm cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works + - name: All code is formatted + run: ./v test-cleancode - name: Self tests with `-gc boehm` with V compiler using Boehm-GC itself run: ./v -gc boehm test-self - name: Test leak detector @@ -189,6 +193,8 @@ jobs: echo $VFLAGS ./v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works + - name: All code is formatted + run: ./v test-cleancode - name: Self tests run: VJOBS=1 ./v test-self - name: Build examples @@ -281,6 +287,8 @@ jobs: echo $VFLAGS ./v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works + - name: All code is formatted + run: ./v test-cleancode - name: Self tests run: ./v test-self - name: Self tests (-prod) @@ -373,6 +381,8 @@ jobs: echo $VFLAGS ./v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works + - name: All code is formatted + run: ./v test-cleancode - name: Self tests run: ./v test-self - name: Self tests (-prod) @@ -443,6 +453,8 @@ jobs: echo $VFLAGS ./v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works + - name: All code is formatted + run: ./v test-cleancode - name: Self tests run: .\v.exe test-self # - name: Test @@ -501,6 +513,9 @@ jobs: echo $VFLAGS ./v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works +### TODO: test-cleancode fails with msvc. Investigate why??? +## - name: All code is formatted +## run: ./v test-cleancode - name: Self tests run: | ./v -cg cmd\tools\vtest-self.v @@ -556,8 +571,8 @@ jobs: run: ./v doc -v clipboard - name: Test v build-tools run: ./v -W build-tools - - name: Test ./v doc clipboard - run: ./v doc clipboard + - name: All code is formatted + run: ./v test-cleancode - name: Self tests run: ./v test-self - name: Test v->js diff --git a/.github/workflows/containers_ci.yml b/.github/workflows/containers_ci.yml index ec8123cd2..287862d7b 100644 --- a/.github/workflows/containers_ci.yml +++ b/.github/workflows/containers_ci.yml @@ -42,6 +42,9 @@ jobs: - name: Build V run: CC=gcc make + - name: All code is formatted + run: ./v test-cleancode + - name: Test V fixed tests run: ./v test-self @@ -69,5 +72,9 @@ jobs: echo $VFLAGS ./v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works + + - name: All code is formatted + run: ./v test-cleancode + - name: Test V fixed tests run: ./v test-self diff --git a/.github/workflows/debug_ci.yml b/.github/workflows/debug_ci.yml index 87da997cc..e40bbc3f2 100644 --- a/.github/workflows/debug_ci.yml +++ b/.github/workflows/debug_ci.yml @@ -25,12 +25,13 @@ jobs: .\v.exe setup-freetype .\.github\workflows\windows-install-sqlite.bat - name: v doctor - run: | - ./v doctor + run: ./v doctor - name: Verify `v test` works run: | ./v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works + - name: All code is formatted + run: ./v test-cleancode - name: Self tests run: | ./v -cg cmd\tools\vtest-self.v -- 2.30.2