Skip to content

Commit

Permalink
fix(practs): bump practs to latest best
Browse files Browse the repository at this point in the history
  • Loading branch information
uladkasach committed Jul 26, 2024
1 parent a910f25 commit 9efec49
Show file tree
Hide file tree
Showing 17 changed files with 549 additions and 537 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/.publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
with:
registry-url: 'https://registry.npmjs.org/'
node-version-file: '.nvmrc'
cache: 'npm'

- name: node-modules cache get
uses: actions/cache/restore@v3
Expand All @@ -36,6 +35,6 @@ jobs:
run: npm run build

- name: publish
run: npm publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.npm-auth-token }}
12 changes: 2 additions & 10 deletions .github/workflows/.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: node-modules cache get
uses: actions/cache/restore@v3
Expand Down Expand Up @@ -64,7 +63,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: get node-modules from cache
uses: actions/cache/restore@v3
Expand All @@ -86,7 +84,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: get node-modules from cache
uses: actions/cache/restore@v3
Expand All @@ -108,7 +105,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: get node-modules from cache
uses: actions/cache/restore@v3
Expand All @@ -130,7 +126,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: get node-modules from cache
uses: actions/cache/restore@v3
Expand All @@ -152,7 +147,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: get node-modules from cache
uses: actions/cache/restore@v3
Expand All @@ -161,7 +155,7 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

- name: test:unit
run: npm run test:unit
run: THOROUGH=true npm run test:unit

test-integration:
runs-on: ubuntu-latest
Expand All @@ -174,7 +168,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: get node-modules from cache
uses: actions/cache/restore@v3
Expand Down Expand Up @@ -202,7 +195,7 @@ jobs:
run: npm run provision:integration-test-db --if-present

- name: test:integration
run: npm run test:integration
run: THOROUGH=true npm run test:integration

test-acceptance-locally:
runs-on: ubuntu-latest
Expand All @@ -215,7 +208,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: get node-modules from cache
uses: actions/cache/restore@v3
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: review

on:
pull_request:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
pullreq-title:
runs-on: ubuntu-latest
steps:
- name: test:pullreq:title
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# https://github.com/commitizen/conventional-commit-types
types: |
fix
feat
chore
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.serverless
.terraform
.terraform.lock
.yalc
coverage
dist
node_modules
2 changes: 1 addition & 1 deletion .husky/check.lockfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ changed () {
}

if changed 'package-lock.json'; then
echo "📦 package-lock.json changed. Run npm install to update your locally installed dependencies."
echo "📦 package-lock.json changed. Run 'npm install' to update your locally installed dependencies."
fi
7 changes: 7 additions & 0 deletions .husky/check.yalc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# https://github.com/wclr/yalc
if [ "$(npx yalc check)" ]; then
echo "✋ package.json has yalc references. Run 'npx yalc remove --all' to remove these local testing references."
fi

4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname -- "$0")/_/husky.sh"

. "$(dirname -- "$0")/check.yalc.sh"
3 changes: 3 additions & 0 deletions jest.acceptance.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import type { Config } from 'jest';

// ensure tests run in utc, like they will on cicd and on server; https://stackoverflow.com/a/56277249/15593329
process.env.TZ = 'UTC';

// https://jestjs.io/docs/configuration
const config: Config = {
verbose: true,
Expand Down
3 changes: 3 additions & 0 deletions jest.integration.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import type { Config } from 'jest';

// ensure tests run in utc, like they will on cicd and on server; https://stackoverflow.com/a/56277249/15593329
process.env.TZ = 'UTC';

// https://jestjs.io/docs/configuration
const config: Config = {
verbose: true,
Expand Down
3 changes: 3 additions & 0 deletions jest.unit.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import type { Config } from 'jest';

// ensure tests run in utc, like they will on cicd and on server; https://stackoverflow.com/a/56277249/15593329
process.env.TZ = 'UTC';

// https://jestjs.io/docs/configuration
const config: Config = {
verbose: true,
Expand Down
Loading

0 comments on commit 9efec49

Please sign in to comment.