Skip to content

Commit

Permalink
ci: use .github (#216)
Browse files Browse the repository at this point in the history
* ci: use .github

* ci: testing this way

* ci: use lint.yml

* ci: remove runs-on

* ci: use build reusable

* ci: use docs reusable

* ci: use composite

* ci: add checkout

* ci: add turbo

* ci(docs): rename

* ci: add tsc problem matcher

* ci: set cache dir .turbo

* ci: use setup-node

* ci: use setup-node with tests
  • Loading branch information
dan-online committed Feb 20, 2023
1 parent 3156370 commit 03ef665
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 111 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/auto-deprecate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@ jobs:
steps:
- name: Checkout Project
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Use Node.js v16
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
- name: Setup Node
uses: josh-development/.github/setup-node@main
with:
node-version: 16
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Install Dependencies
run: yarn --immutable
turbo: true
- name: Deprecate Versions
run: yarn npm-deprecate
env:
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,10 @@ jobs:
ref: ${{ github.event.inputs.branch || 'main' }}
- name: Add TypeScript Problem Matcher
run: echo "::add-matcher::.github/problemMatchers/tsc.json"
- name: Use Node.js v16
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
- name: Setup Node
uses: josh-development/.github/setup-node@main
with:
node-version: 16
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Install Dependencies
run: yarn --immutable
turbo: true
- name: Bump Versions & Publish
run: |
# Resolve the tag to be used. "next" for push events, "pr-{prNumber}" for dispatch events.
Expand Down
52 changes: 9 additions & 43 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,57 +7,23 @@ on:
pull_request:

jobs:
linting:
name: Linting
ci:
name: Continuous Integration
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Setup Node
uses: josh-development/.github/setup-node@main
with:
turbo: true
- name: Add ESLint Problem Matcher
run: echo "::add-matcher::.github/problemMatchers/eslint.json"
- name: Use Node.js v16
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
with:
node-version: 16
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Install Dependencies
run: yarn --immutable
- name: Run ESLint
run: yarn lint --fix=false

building:
name: Compile Source Code
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Add TypeScript Problem Matcher
run: echo "::add-matcher::.github/problemMatchers/tsc.json"
- name: Use Node.js v16
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
with:
node-version: 16
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Install Dependencies
run: yarn --immutable
- name: Compile Packages
run: yarn build

docs:
name: Generate Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Use Node.js v16
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
with:
node-version: 16
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Install Dependencies
run: yarn --immutable
- name: Compile Source Code
run: yarn build --cache-dir=./.turbo
- name: Generate Documentation
run: yarn docs
run: yarn docs --cache-dir=./.turbo
54 changes: 21 additions & 33 deletions .github/workflows/continuous-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@ jobs:
steps:
- name: Checkout Project
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Use Node.js v16
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
- name: Setup Node
uses: josh-development/.github/setup-node@main
with:
node-version: 16
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Install Dependencies
run: yarn --immutable
turbo: true
- name: Run Tests
run: yarn workspace @joshdb/json run test
- name: Store Code Coverage Report
Expand All @@ -34,14 +30,10 @@ jobs:
steps:
- name: Checkout Project
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Use Node.js v16
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
- name: Setup Node
uses: josh-development/.github/setup-node@main
with:
node-version: 16
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Install Dependencies
run: yarn --immutable
turbo: true
- name: Run Tests
run: yarn workspace @joshdb/map run test
- name: Store Code Coverage Report
Expand All @@ -55,10 +47,10 @@ jobs:
steps:
- name: Checkout Project
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Use Node.js v16
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
- name: Setup Node
uses: josh-development/.github/setup-node@main
with:
node-version: 16
turbo: true
- name: Shutdown MySQL
run: sudo service mysql stop
- name: Start MariaDB Instance
Expand All @@ -82,10 +74,10 @@ jobs:
steps:
- name: Checkout Project
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Use Node.js v16
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
- name: Setup Node
uses: josh-development/.github/setup-node@main
with:
node-version: 16
turbo: true
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Start Mongo Database
Expand Down Expand Up @@ -120,14 +112,10 @@ jobs:
steps:
- name: Checkout Project
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Use Node.js v16
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
- name: Setup Node
uses: josh-development/.github/setup-node@main
with:
node-version: 16
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Install Dependencies
run: yarn --immutable
turbo: true
- name: Run Tests
run: yarn workspace @joshdb/postgresql run test --coverage
- name: Store Code Coverage Report
Expand All @@ -141,10 +129,10 @@ jobs:
steps:
- name: Checkout Project
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Use Node.js v16
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
- name: Setup Node
uses: josh-development/.github/setup-node@main
with:
node-version: 16
turbo: true
- name: Start Redis Instance
uses: supercharge/redis-github-action@4b67a313c69bc7a90f162e8d810392fffe10d3b5 # tag=1.4.0
with:
Expand All @@ -164,10 +152,10 @@ jobs:
steps:
- name: Checkout Project
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Use Node.js v16
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
- name: Setup Node
uses: josh-development/.github/setup-node@main
with:
node-version: 16
turbo: true
- name: Install Dependencies
run: yarn --immutable
- name: Run Tests
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/deprecate-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,10 @@ jobs:
steps:
- name: Checkout Project
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Use Node.js v16
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
- name: Setup Node
uses: josh-development/.github/setup-node@main
with:
node-version: 16
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Install Dependencies
run: yarn --immutable
turbo: true
- name: Deprecate Versions
run: yarn npm-deprecate --name "*pr-${PR_NUMBER}*" -d -v
env:
Expand Down
20 changes: 6 additions & 14 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,10 @@ jobs:
steps:
- name: Checkout Project
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Use Node.js v16
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
- name: Setup Node
uses: josh-development/.github/setup-node@main
with:
node-version: 16
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Install Dependencies
run: yarn --immutable
turbo: true
- name: Build Packages
run: yarn build
- name: Build Documentation
Expand Down Expand Up @@ -71,14 +67,10 @@ jobs:
steps:
- name: Checkout Project
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Use Node.js v16
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
- name: Setup Node
uses: josh-development/.github/setup-node@main
with:
node-version: 16
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Install Dependencies
run: yarn --immutable
turbo: true
- name: Download Documentation Artifacts
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3
with:
Expand Down

0 comments on commit 03ef665

Please sign in to comment.