Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add GitHub Pipelines (#10) #15

Merged
merged 2 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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="
}
}
Loading