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

Implement Initial Monorepo #1551

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
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
88 changes: 26 additions & 62 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,80 +1,44 @@
name: Continuous Integration
name: CI

on:
push:
branches:
- master
branches: ["master"]
pull_request:
types: [opened, synchronize]

jobs:
Testing:
name: Unit Tests
build:
name: Build and Test
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
ts-project: [src/tsconfig.json, src/tsconfig-es6.json]
env:
TS_NODE_PROJECT: ${{ matrix.ts-project }}

steps:
- name: Checkout Project
- name: Check out code
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
registry-url: https://registry.npmjs.org/
- name: Install Dependencies
run: npm ci
- name: Run tests
run: npm test --coverage
- name: Store code coverage report
uses: actions/upload-artifact@v3
fetch-depth: 2

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
name: coverage
path: coverage/
node-version: 18
cache: "npm"

Build:
name: Compile source code
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
ts-project: [src/tsconfig.json, src/tsconfig-es6.json]
env:
TS_NODE_PROJECT: ${{ matrix.ts-project }}
- name: Install dependencies
run: npm install

steps:
- name: Checkout Project
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
registry-url: https://registry.npmjs.org/
- run: npm cache clean --force
- run: npm ci
- run: npm run build --if-present
- name: Lint
run: npm run lint

Upload_Coverage_Report:
name: Upload coverage report to codecov
needs: [Testing]
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Download Coverage report
uses: actions/download-artifact@v3
- name: Build
run: npm run build

- name: Test
run: npm run test

- name: Upload Coverage Artifact
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage/
- name: Codecov Upload
uses: codecov/codecov-action@v3
with:
directory: coverage/
fail_ci_if_error: true
if-no-files-found: error
55 changes: 55 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Code Coverage

on:
push:
branches: ["master"]

jobs:
generate:
name: Generate Coverage
timeout-minutes: 15
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"

- name: Generate Coverage Report
run: npm run coverage

- name: Upload Coverage Artifact
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage/
if-no-files-found: error

upload:
name: Upload Coverage
needs: [generate]
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Download Coverage Artifact
uses: actions/download-artifact@v4
with:
name: coverage
path: coverage/

- name: Upload to Codecov
uses: codecov/codecov-action@v3
with:
directory: coverage/
fail_ci_if_error: true
File renamed without changes.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ type_definitions/**/*.js
.idea

.nyc_output
/.turbo/
28 changes: 0 additions & 28 deletions .npmignore

This file was deleted.

12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ git clone https://github.com/YOUR_USERNAME/InversifyJS.git
npm install
```

3 Run build process
3 Run the build script

```sh
npm test
npm run build
```

## Guidelines

- Please try to [combine multiple commits before pushing](http://stackoverflow.com/questions/6934752/combining-multiple-commits-before-pushing-in-git)

- Please use `TDD` when fixing bugs. This means that you should write a unit test that fails because it reproduces the issue, then fix the issue and finally run the test to ensure that the issue has been resolved. This helps us prevent fixed bugs from happening again in the future
- Please use `TDD` when fixing bugs. This means that you should write a unit test that fails because it reproduces the issue, fix the issue, and finally run the test to ensure that the issue has been resolved. This helps us prevent fixed bugs from happening again in the future.

- Please keep the test coverage at 100%. Write additional unit tests if necessary
- Please keep the test coverage at 100%. Write additional unit tests if necessary.

- Please create an issue before sending a PR if it is going to change the public interface of InversifyJS or includes significant architecture changes
- Please create an issue before sending a PR if it is going to change the public interface of InversifyJS or includes significant architecture changes.

- Feel free to ask for help from other members of the InversifyJS team via the chat / mailing list or github issues
- Feel free to ask for help from other members of the InversifyJS team via the chat, mailing list, or github issues.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015-2017 Remo H. Jansen
Copyright (c) 2023 Inversify

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading