diff --git a/.github/workflows/IntegrationTest.yml b/.github/workflows/IntegrationTest.yml new file mode 100644 index 0000000..d9071c2 --- /dev/null +++ b/.github/workflows/IntegrationTest.yml @@ -0,0 +1,39 @@ +name: "IntegrationTest" +on: + push: + branches: + - "main" + tags: "*" + paths: + - "Project.toml" + pull_request: + types: + - "opened" + - "synchronize" + - "reopened" + - "ready_for_review" + - "converted_to_draft" + paths: + - "Project.toml" +jobs: + integration-test: + name: "IntegrationTest" + strategy: + matrix: + pkg: + - "__none__" + uses: "ITensor/ITensorActions/.github/workflows/IntegrationTest.yml@main" + with: + localregistry: "https://github.com/ITensor/ITensorRegistry.git" + pkg: "${{ matrix.pkg }}" + integration-gate: + name: "IntegrationTest" + needs: "integration-test" + if: "${{ always() }}" + runs-on: "ubuntu-latest" + steps: + - name: "Fail if any downstream integration test failed" + run: | + echo "integration-test.result = ${{ needs.integration-test.result }}" + test "${{ needs.integration-test.result }}" = "success" + diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index e3a94c5..db43292 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -40,3 +40,14 @@ jobs: localregistry: "https://github.com/ITensor/ITensorRegistry.git" secrets: CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}" + tests-gate: + name: "Tests" + needs: "tests" + if: "${{ always() }}" + runs-on: "ubuntu-latest" + steps: + - name: "Fail if any matrix leg failed" + run: | + echo "tests.result = ${{ needs.tests.result }}" + test "${{ needs.tests.result }}" = "success" + diff --git a/Project.toml b/Project.toml index cff26a7..3c9f060 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "ITensorFormatter" uuid = "b6bf39f1-c9d3-4bad-aad8-593d802f65fd" -version = "0.2.14" +version = "0.2.15" authors = ["ITensor developers and contributors"] [workspace] diff --git a/docs/make_readme.jl b/docs/make_readme.jl index d85f32b..02eed8b 100644 --- a/docs/make_readme.jl +++ b/docs/make_readme.jl @@ -1,21 +1,17 @@ -using ITensorFormatter: ITensorFormatter using Literate: Literate -function ccq_logo(content) - include_ccq_logo = """ - - - Flatiron Center for Computational Quantum Physics logo. - - """ - content = replace(content, "{CCQ_LOGO}" => include_ccq_logo) - return content -end +let inputfile = joinpath(@__DIR__, "..", "examples", "README.jl"), + outputdir = joinpath(@__DIR__, ".."), flavor = Literate.CommonMarkFlavor(), + name = "README" -Literate.markdown( - joinpath(pkgdir(ITensorFormatter), "examples", "README.jl"), - joinpath(pkgdir(ITensorFormatter)); - flavor = Literate.CommonMarkFlavor(), - name = "README", - postprocess = ccq_logo -) + function postprocess(content) + include_ccq_logo = """ + + + Flatiron Center for Computational Quantum Physics logo. + + """ + return replace(content, "{CCQ_LOGO}" => include_ccq_logo) + end + Literate.markdown(inputfile, outputdir; flavor, name, postprocess) +end