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

ci: Update gitlab and github CI to build with node 18/20 #351

Merged
merged 1 commit into from
Feb 21, 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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
node-version: [18.x, 20.x]

steps:
- name: Git checkout
Expand Down
78 changes: 78 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
image: node:18.16

stages:
- test
- build
- deploy
- package
- release

cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- node_modules/

test:
image: trion/ng-cli-karma
stage: test
script:
- npm install
- npm run test:ci
coverage: '/^Statements\s*:\s*([^%]+)/'
artifacts:
paths:
- coverage/
- test-report/*.xml
reports:
junit: test-report/*.xml
except:
variables:
- $TEST_DISABLED

build:
stage: build
script:
- npm install -g @angular/cli
- npm install
- npm run build:prod
artifacts:
paths:
- dist/

package:
stage: package
dependencies:
- build
script:
- ./package.sh
artifacts:
name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"
paths:
- "*.tar.gz"
rules:
- if: $CI_COMMIT_TAG
when: on_success
allow_failure: false
- if: $CI_MERGE_REQUEST_ID
when: never
- when: manual
allow_failure: true

# store and publish code coverage HTML report folder
pages:
stage: deploy
needs:
- test
script:
# delete everything in the current public folder
# and replace with code coverage HTML report
- rm -rf public/coverage
- mkdir -p public/coverage
- cp -R coverage/lcov-report/* public/coverage
artifacts:
paths:
- public
expire_in: 30 days
only:
- test

Loading