Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Commit

Permalink
Merge pull request #8 from coretl/ci-test
Browse files Browse the repository at this point in the history
Test
  • Loading branch information
coretl authored Jan 18, 2024
2 parents 4bf7d5b + 2b1e6a3 commit 1e4bc05
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
head: context.repo.owner + ':${{ github.ref_name }}'
})
if (prs.data.length) {
console.log(`Branch is in PR #${prs.data[0]["number"]}`)
console.log(`::notice ::Skipping CI on branch push as it is already run in PR #${prs.data[0]["number"]}`)
return prs.data[0]["number"]
}
9 changes: 6 additions & 3 deletions .github/workflows/_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ jobs:
- name: Build docs
run: tox -e docs

- name: Move to versioned directory
run: mv build/html build/${GITHUB_REF_NAME//[^A-Za-z0-9._-]/_}

- name: Upload built docs artifact
uses: actions/upload-artifact@v4
with:
name: docs
path: build

- name: Move to versioned directory
run: mv build/html .github/pages/main
- name: Add other static pages files
run: cp .github/pages/* build

- name: Add other releases
run: echo Not done yet
Expand All @@ -38,7 +41,7 @@ jobs:
if: github.ref_name == 'main'
uses: actions/upload-pages-artifact@v3
with:
path: .github/pages
path: build

- name: Setup Pages
uses: actions/configure-pages@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v4

- run: ls *

- name: Create GitHub Release
# We pin to the SHA, not the tag, for security reasons.
# https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
with:
prerelease: ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc') }}
files: ./*
files: |
dist
docs
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ ENV PATH=/venv/bin:$PATH
# The build stage installs the context into the venv
FROM developer as build
COPY . /context
RUN pip install /context
WORKDIR /context
RUN pip install -c requirements/dev-constraints.txt /context

# The runtime stage copies the built venv into a slim runtime container
FROM python:${PYTHON_VERSION}-slim as runtime
Expand Down
15 changes: 15 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Releases https://github.com/coretl/copier-example/releases

This is a test repo.


This is where you should put some images or code snippets that illustrate
some relevant examples. If it is a library then you might put some
introductory code here:
Expand All @@ -29,6 +30,20 @@ Or if it is a commandline tool then you might put some example commands here::

$ python -m copier_example --version

TODO
====

- [x] Use pyright instead of mypy
- [x] Use
- [x] Use GH pages publishing
- [x] Split up CI
- [x] Slim down devcontainer
- [x] Use dev constraints everywhere
- [ ] Investigate ruff checks and fixes
- [ ] Add pre-commit for dev constraints
- [ ] Get docs from releases and add them too
- [ ] MD-ify docs

.. |code_ci| image:: https://github.com/coretl/copier-example/actions/workflows/code.yml/badge.svg?branch=main
:target: https://github.com/coretl/copier-example/actions/workflows/code.yml
:alt: Code CI
Expand Down

0 comments on commit 1e4bc05

Please sign in to comment.