Compare commits
8 Commits
6ac1015718
...
v4.0.7
Author | SHA1 | Date | |
---|---|---|---|
534a2011a1 | |||
e1b6c3e4f0 | |||
1adb45d75e | |||
62ab5404cf | |||
e43c07f75a | |||
fc5f80232e | |||
695eea2985 | |||
a739d3b5a2 |
@ -13,32 +13,40 @@ executors:
|
||||
nodejs:
|
||||
docker:
|
||||
- image: node:18
|
||||
resource_class: small
|
||||
resource_class: medium
|
||||
|
||||
|
||||
jobs:
|
||||
python-test:
|
||||
executor: python
|
||||
working_directory: ./py/lib
|
||||
working_directory: ~/scwrypts/py/lib
|
||||
steps:
|
||||
- run: |
|
||||
: \
|
||||
&& pip install -e . \
|
||||
&& pytest \
|
||||
;
|
||||
- checkout:
|
||||
path: ~/scwrypts
|
||||
- run:
|
||||
name: pytest
|
||||
command: |
|
||||
: \
|
||||
&& pip install . .[test] \
|
||||
&& pytest \
|
||||
;
|
||||
- run: pip install build && python -m build
|
||||
|
||||
python-publish:
|
||||
executor: python
|
||||
working_directory: ~/scwrypts/py/lib
|
||||
steps:
|
||||
- checkout
|
||||
- python/dist
|
||||
- checkout:
|
||||
path: ~/scwrypts
|
||||
- run: pip install build && python -m build
|
||||
- run: pip install twine && twine upload dist/*
|
||||
|
||||
nodesjs-test:
|
||||
nodejs-test:
|
||||
executor: nodejs
|
||||
working_directory: ./zx/lib
|
||||
working_directory: ~/scwrypts/zx/lib
|
||||
steps:
|
||||
- checkout
|
||||
- checkout:
|
||||
path: ~/scwrypts
|
||||
|
||||
- restore_cache:
|
||||
name: restore pnpm cache
|
||||
@ -61,12 +69,14 @@ jobs:
|
||||
|
||||
- run: pnpm test
|
||||
- run: pnpm lint
|
||||
- run: pnpm build
|
||||
|
||||
nodesjs-publish:
|
||||
nodejs-publish:
|
||||
executor: nodejs
|
||||
working_directory: ./zx/lib
|
||||
working_directory: ~/scwrypts/zx/lib
|
||||
steps:
|
||||
- checkout
|
||||
- checkout:
|
||||
path: ~/scwrypts
|
||||
|
||||
- restore_cache:
|
||||
name: restore pnpm cache
|
||||
@ -87,23 +97,62 @@ jobs:
|
||||
paths:
|
||||
- .pnpm-store
|
||||
|
||||
- run: pnpm build
|
||||
- run: pnpm version $(git describe --tags)
|
||||
|
||||
- run:
|
||||
name: publish
|
||||
command: |
|
||||
: \
|
||||
&& [ $CIRCLE_TAG ] \
|
||||
&& pnpm build \
|
||||
&& pnpm version $CIRCLE_TAG \
|
||||
&& pnpm set //registry.npmjs.org/:_authToken=$NPM_TOKEN \
|
||||
&& pnpm publish --no-git-checks \
|
||||
;
|
||||
|
||||
workflows:
|
||||
build:
|
||||
python-dev:
|
||||
jobs:
|
||||
- python-test
|
||||
- python-test:
|
||||
filters:
|
||||
branches:
|
||||
ignore: /^main$/
|
||||
|
||||
python:
|
||||
jobs:
|
||||
- python-test:
|
||||
filters:
|
||||
tags:
|
||||
only: /^v\d+\.\d+\.\d+.*$/
|
||||
branches:
|
||||
ignore: /^.*$/
|
||||
- python-publish:
|
||||
requires: [python-test]
|
||||
context: [pypi-yage]
|
||||
filters:
|
||||
tags:
|
||||
only: /^v\d+\.\d+\.\d+.*$/
|
||||
branches:
|
||||
ignore: /^.*$/
|
||||
|
||||
nodejs-dev:
|
||||
jobs:
|
||||
- nodejs-test:
|
||||
filters:
|
||||
branches:
|
||||
only: main
|
||||
ignore: /^main$/
|
||||
|
||||
- nodejs-test
|
||||
nodejs:
|
||||
jobs:
|
||||
- nodejs-test:
|
||||
filters:
|
||||
tags:
|
||||
only: /^v\d+\.\d+\.\d+.*$/
|
||||
branches:
|
||||
ignore: /^.*$/
|
||||
- nodejs-publish:
|
||||
requires: [nodejs-test]
|
||||
context: [npm-wrynegade]
|
||||
filters:
|
||||
tags:
|
||||
only: /^v\d+\.\d+\.\d+.*$/
|
||||
branches:
|
||||
only: main
|
||||
ignore: /^.*$/
|
||||
|
@ -55,7 +55,8 @@ runs:
|
||||
--name scwrypts/virtualenv/update-all \
|
||||
--group scwrypts \
|
||||
--type zsh \
|
||||
> $HOME/.scwrypts.virtualenv.log 2>&1
|
||||
;
|
||||
#> $HOME/.scwrypts.virtualenv.log 2>&1
|
||||
|
||||
echo "CI_SCWRYPTS_READY=1" >> $GITHUB_ENV
|
||||
exit 0
|
||||
|
3
py/lib/.gitignore
vendored
3
py/lib/.gitignore
vendored
@ -1 +1,4 @@
|
||||
dist/
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*.so
|
||||
|
@ -55,6 +55,5 @@ source = 'versioningit'
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ['./']
|
||||
|
||||
[tool.versioningit]
|
||||
match = ['v*']
|
||||
|
||||
[tool.versioningit.vcs]
|
||||
match = ['v[0-9]*.[0-9]*.[0-9]*']
|
||||
|
@ -41,7 +41,7 @@ def scwrypts(*args, patterns=None, name=None, group=None, _type=None, log_level=
|
||||
depth = int(depth) + 1
|
||||
|
||||
return run(
|
||||
f'SUBSCWRYPT={depth} {executable} {pre_args} -- {" ".join(args)}',
|
||||
f'SUBSCWRYPT={depth} {executable} {" ".join(pre_args)} -- {" ".join(args)}',
|
||||
shell=True,
|
||||
executable='/bin/zsh',
|
||||
check=False,
|
||||
|
@ -26,6 +26,7 @@
|
||||
"prettier": "^3.2.5",
|
||||
"ts-jest": "^29.1.2",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.3.3",
|
||||
"uuid": "^9.0.1"
|
||||
},
|
||||
"eslintConfig": {
|
||||
|
3
zx/lib/pnpm-lock.yaml
generated
3
zx/lib/pnpm-lock.yaml
generated
@ -43,6 +43,9 @@ devDependencies:
|
||||
ts-node:
|
||||
specifier: ^10.9.2
|
||||
version: 10.9.2(@types/node@20.11.19)(typescript@5.3.3)
|
||||
typescript:
|
||||
specifier: ^5.3.3
|
||||
version: 5.3.3
|
||||
uuid:
|
||||
specifier: ^9.0.1
|
||||
version: 9.0.1
|
||||
|
@ -64,11 +64,9 @@ afterEach(() => {
|
||||
});
|
||||
|
||||
describe('exact lookup', () => {
|
||||
let output;
|
||||
beforeEach(async () => {
|
||||
sample.spy.getScwryptsLookup.mockReturnValue(sample.lookup.exact);
|
||||
|
||||
output = await scwrypts(sample.options);
|
||||
await scwrypts(sample.options);
|
||||
});
|
||||
|
||||
test('gets the correct lookup', () => {
|
||||
@ -98,7 +96,6 @@ describe('exact lookup', () => {
|
||||
describe('patterns lookup', () => {
|
||||
beforeEach(async () => {
|
||||
sample.spy.getScwryptsLookup.mockReturnValue(sample.lookup.patterns);
|
||||
|
||||
await scwrypts(sample.options);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user