Skip to content

Commit

Permalink
Merge pull request #15 from amosproj/feat/xd-10
Browse files Browse the repository at this point in the history
feat: Add GitHub Pipelines (#10)
  • Loading branch information
KonsumGandalf authored Apr 26, 2024
2 parents 7883244 + 325a2de commit c198a7d
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 47 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ jobs:

- uses: pnpm/action-setup@v2
with:
version: 8
version: 8.15.1

# Connect your workspace on nx.app and uncomment this to enable task distribution.
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested
# - run: pnpm exec nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci"

# Cache node_modules
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- uses: nrwl/nx-set-shas@v4
Expand Down
90 changes: 90 additions & 0 deletions .github/workflows/lint-test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Lint Test Build
on:
push:
branches:
- develop
pull_request:
branches:
- develop

jobs:
install-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v2
with:
version: 8.15.1

# Connect your workspace on nx.app and uncomment this to enable task distribution.
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested
- run: pnpm exec nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci"

# Cache node_modules
- uses: actions/setup-node@v4
with:
node-version: 22.x
cache: 'pnpm'

- name: PNPM install based on lockfile
run: pnpm install --frozen-lockfile

lint:
runs-on: ubuntu-latest
needs: install-deps
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- run: git fetch --no-tags --prune --depth=1 origin develop

- name: Cache node modules
uses: actions/cache@v4
with:
path: node_modules
key: cache-node-modules-${{ hashFiles('pnpm-lock.json') }}

- run: npx nx affected --target=lint --parallel=3 --base=origin/develop

test:
runs-on: ubuntu-latest
needs: install-deps
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- run: git fetch --no-tags --prune --depth=1 origin develop

- name: Cache node modules
uses: actions/cache@v4
with:
path: node_modules
key: cache-node-modules-${{ hashFiles('pnpm-lock.json') }}

- run: npx nx affected --target=test --parallel=3 --configuration=ci --base=origin/develop

build:
runs-on: ubuntu-latest
needs: install-deps
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- run: git fetch --no-tags --prune --depth=1 origin develop

- name: Cache node modules
uses: actions/cache@v4
with:
path: node_modules
key: cache-node-modules-${{ hashFiles('pnpm-lock.json') }}

- run: npx nx affected --target=build --parallel=3 --configuration=ci --base=origin/develop
37 changes: 0 additions & 37 deletions .github/workflows/workflows/ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .idea/dbnavigator.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/material_theme_project_new.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,5 @@
"style": "scss",
"unitTestRunner": "jest"
}
},
"nxCloudAccessToken": "NjQ2N2JlZmEtMDI5Yi00NThkLTgyOGEtNmNlM2UxNWI3ODM3fHJlYWQtd3JpdGU="
}
}

0 comments on commit c198a7d

Please sign in to comment.