From fc7511f8859c829e11f27b396559ef634bc43803 Mon Sep 17 00:00:00 2001 From: Stefan Krastanov Date: Mon, 5 Feb 2024 23:13:42 -0500 Subject: [PATCH] github/workflow cleanup (#7) --- .github/workflows/benchmark-comment.yml | 6 +++--- .github/workflows/benchmark.yml | 3 +++ .github/workflows/ci-julia-nightly.yml | 18 ++++++------------ .github/workflows/ci.yml | 20 +++++++------------- .github/workflows/downgrade.yml | 5 ++++- .github/workflows/invalidations.yml | 1 + .github/workflows/spelling.yml | 15 +++++++++++++++ .typos.toml | 7 +++++++ README.md | 2 +- 9 files changed, 47 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/spelling.yml create mode 100644 .typos.toml diff --git a/.github/workflows/benchmark-comment.yml b/.github/workflows/benchmark-comment.yml index ffb2d3f..e873dbf 100644 --- a/.github/workflows/benchmark-comment.yml +++ b/.github/workflows/benchmark-comment.yml @@ -42,7 +42,7 @@ jobs: # check if the previous comment exists - name: find comment - uses: peter-evans/find-comment@v2 + uses: peter-evans/find-comment@v3 id: fc with: issue-number: ${{ steps.output-pull-request-number.outputs.body }} @@ -52,13 +52,13 @@ jobs: # create/update comment - name: create comment if: ${{ steps.fc.outputs.comment-id == 0 }} - uses: peter-evans/create-or-update-comment@v3 + uses: peter-evans/create-or-update-comment@v4 with: issue-number: ${{ steps.output-pull-request-number.outputs.body }} body: ${{ steps.output-result-markdown.outputs.body }} - name: update comment if: ${{ steps.fc.outputs.comment-id != 0 }} - uses: peter-evans/create-or-update-comment@v3 + uses: peter-evans/create-or-update-comment@v4 with: comment-id: ${{ steps.fc.outputs.comment-id }} body: ${{ steps.output-result-markdown.outputs.body }} diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 5218fc7..34c65be 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -2,6 +2,9 @@ name: Performance tracking on: pull_request: +env: + PYTHON: ~ + jobs: performance-tracking: runs-on: ubuntu-latest diff --git a/.github/workflows/ci-julia-nightly.yml b/.github/workflows/ci-julia-nightly.yml index 6910938..9182797 100644 --- a/.github/workflows/ci-julia-nightly.yml +++ b/.github/workflows/ci-julia-nightly.yml @@ -4,6 +4,8 @@ on: branches: [master, main] tags: ["*"] pull_request: +env: + PYTHON: ~ jobs: test: name: Julia ${{ matrix.version }} - t=${{ matrix.threads }} - jet=${{ matrix.jet }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} @@ -28,22 +30,14 @@ jobs: with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v4 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- + - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 env: JULIA_NUM_THREADS: ${{ matrix.threads }} JET_TEST: ${{ matrix.jet }} - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: - file: lcov.info \ No newline at end of file + file: lcov.info + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96b7a65..4cb6fe4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,8 @@ on: branches: [master, main] tags: ["*"] pull_request: +env: + PYTHON: ~ jobs: test: name: Julia ${{ matrix.version }} - t=${{ matrix.threads }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} @@ -12,13 +14,12 @@ jobs: fail-fast: false matrix: version: - - '1' - '1.9' + - '1' os: - ubuntu-latest threads: - '1' - - '5' arch: - x64 steps: @@ -27,24 +28,16 @@ jobs: with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v4 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- + - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 env: JULIA_NUM_THREADS: ${{ matrix.threads }} - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: file: lcov.info + token: ${{ secrets.CODECOV_TOKEN }} docs: name: Documentation runs-on: ubuntu-latest @@ -53,6 +46,7 @@ jobs: - uses: julia-actions/setup-julia@v1 with: version: '1' + - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-docdeploy@v1 env: diff --git a/.github/workflows/downgrade.yml b/.github/workflows/downgrade.yml index 6dfc237..61b4889 100644 --- a/.github/workflows/downgrade.yml +++ b/.github/workflows/downgrade.yml @@ -8,6 +8,8 @@ on: branches: [master, main] paths-ignore: - 'docs/**' +env: + PYTHON: ~ jobs: test: runs-on: ubuntu-latest @@ -21,6 +23,7 @@ jobs: version: ${{ matrix.version }} - uses: cjdoris/julia-downgrade-compat-action@v1 with: - skip: Pkg,TOML,InteractiveUtils,Random,LinearAlgebra + skip: Pkg,TOML,InteractiveUtils,Random,LinearAlgebra,Dates + - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 \ No newline at end of file diff --git a/.github/workflows/invalidations.yml b/.github/workflows/invalidations.yml index 7e0aefe..e6aade0 100644 --- a/.github/workflows/invalidations.yml +++ b/.github/workflows/invalidations.yml @@ -20,6 +20,7 @@ jobs: with: version: '1' - uses: actions/checkout@v4 + - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-invalidations@v1 id: invs_pr diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml new file mode 100644 index 0000000..d9ee073 --- /dev/null +++ b/.github/workflows/spelling.yml @@ -0,0 +1,15 @@ +name: Spell Check + +on: [pull_request] + +jobs: + typos-check: + name: Spell Check with Typos + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v4 + - name: Check spelling + uses: crate-ci/typos@master + with: + config: .typos.toml \ No newline at end of file diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 0000000..df2fc60 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,7 @@ +[default.extend-words] +ket = "ket" + +[type.ipynb] +# It detects false possitives in the base64 encoded images inside notebooks +extend-glob = ["*.ipynb"] +check-file = false diff --git a/README.md b/README.md index f55475f..825d0ec 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ julia> bpd = ldpc.bp_decoder( error_rate=0.1, # the error rate on each bit max_iter=n, # the maximum iteration depth for BP bp_method="product_sum", # BP method. The other option is `minimum_sum' - channel_probs=[nothing] # channel probability probabilities. Will overide error rate. + channel_probs=[nothing] # channel probability probabilities. Will override error rate. ) PyObject