From f2c195552c5989db75e57fec881442a0ed14ab2d Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Thu, 6 Jan 2022 17:56:24 -0500 Subject: [PATCH 1/4] Setup CI --- .github/workflows/test.yml | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..2b05751 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,54 @@ +name: Test + +on: + push: + branches: + - main + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + julia-version: + - '1' + - '1.6' + - 'nightly' + fail-fast: false + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.julia-version }} + - uses: julia-actions/julia-runtest@v1 + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 + with: + file: ./lcov.info + flags: Pkg.test + name: codecov-umbrella + check: + if: always() && github.event.pull_request + needs: test + runs-on: ubuntu-latest + steps: + - name: "Dump jobs' conclusion" + run: | + gh api repos/tkf/Schedulers.jl/actions/runs/${{ github.run_id }}/jobs \ + --jq '.jobs[] | { name, conclusion }' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + - name: "Check test matrix" + run: | + num_non_successes="$( + gh api repos/tkf/Schedulers.jl/actions/runs/${{ github.run_id }}/jobs \ + --jq '[.jobs[] | .conclusion | select(. != "success")] | length' \ + )" + + echo "num_non_successes = $num_non_successes" + [ "$num_non_successes" = 0 ] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash From bf09b065e64b2bcb592b1713f71342987d7640bf Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Thu, 6 Jan 2022 18:01:01 -0500 Subject: [PATCH 2/4] Disable tests with Julia 1.6 for now --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2b05751..11eb4e8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: matrix: julia-version: - '1' - - '1.6' + # - '1.6' - 'nightly' fail-fast: false steps: From bfdd3d8981ab077a205e44aa30fcdd09f00f1b10 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Thu, 6 Jan 2022 18:04:21 -0500 Subject: [PATCH 3/4] Fix repository name --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 11eb4e8..b1a1e7d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,7 +35,7 @@ jobs: steps: - name: "Dump jobs' conclusion" run: | - gh api repos/tkf/Schedulers.jl/actions/runs/${{ github.run_id }}/jobs \ + gh api repos/tkf/Try.jl/actions/runs/${{ github.run_id }}/jobs \ --jq '.jobs[] | { name, conclusion }' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -43,7 +43,7 @@ jobs: - name: "Check test matrix" run: | num_non_successes="$( - gh api repos/tkf/Schedulers.jl/actions/runs/${{ github.run_id }}/jobs \ + gh api repos/tkf/Try.jl/actions/runs/${{ github.run_id }}/jobs \ --jq '[.jobs[] | .conclusion | select(. != "success")] | length' \ )" From 0194ac6ce3bcce6a71e2881316f97b64f40ecffd Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Thu, 6 Jan 2022 18:09:32 -0500 Subject: [PATCH 4/4] Fix conclusion check --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b1a1e7d..dde4297 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,7 +36,7 @@ jobs: - name: "Dump jobs' conclusion" run: | gh api repos/tkf/Try.jl/actions/runs/${{ github.run_id }}/jobs \ - --jq '.jobs[] | { name, conclusion }' + --jq '.jobs[] | select(.conclusion != null) | { name, conclusion }' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash @@ -44,7 +44,7 @@ jobs: run: | num_non_successes="$( gh api repos/tkf/Try.jl/actions/runs/${{ github.run_id }}/jobs \ - --jq '[.jobs[] | .conclusion | select(. != "success")] | length' \ + --jq '[.jobs[] | select(.conclusion != null) | .conclusion | select(. != "success")] | length' \ )" echo "num_non_successes = $num_non_successes"