Skip to content

Commit

Permalink
Merge pull request #97 from nestdotland/dev
Browse files Browse the repository at this point in the history
0.3.0
  • Loading branch information
SteelAlloy authored Oct 24, 2020
2 parents 3484fbe + accbbd6 commit f5ff3cc
Show file tree
Hide file tree
Showing 41 changed files with 904 additions and 623 deletions.
8 changes: 8 additions & 0 deletions .eggignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends .gitignore
.*ignore

# Extra typescript files
test/
*_test.ts
Drakefile.ts

74 changes: 74 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
## Code of Conduct

### Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

### Our Standards

Examples of behaviour that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behaviour by participants include:

- The use of sexualised language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

### Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behaviour and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behaviour.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

### Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

### Enforcement

Instances of abusive, harassing, or otherwise unacceptable behaviour may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

### Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
62 changes: 62 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<p align="center">
<img alt="GitHub issues" src="https://img.shields.io/github/issues-raw/nestdotland/eggs?logo=github">
<img alt="GitHub closed issues" src="https://img.shields.io/github/issues-closed-raw/nestdotland/eggs?logo=github">
<img alt="GitHub contributors" src="https://img.shields.io/github/contributors/nestdotland/eggs">
</p>
<p align="center">
<a href="https://deno.land"><img src="https://img.shields.io/badge/-deno-gray?logo=deno" alt="Runtime"></a>
<a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/-typescript-blue?logo=typescript" alt="language"></a>
</p>

# Contributing / Developing

Contributions are welcome. Fork this repository and issue a pull request with your changes.

Please add new tests for new functionality, adapt the existing ones if needed, and make sure that `deno test` succeeds.

### Prerequisites
You need to have [Git](https://git-scm.com/downloads) and [deno](https://deno.land) installed on your system.

### Setting up Dev
Just execute these commands:

```shell
git clone https://github.com/nestdotland/eggs.git
cd eggs/
```

This project uses drake to manage project scripts. Run it with Deno:
```sh
deno run -A Drakefile.ts
# A shell alias shortcut can be set to run the default drakefile:
alias drake="deno run -A Drakefile.ts"
```

### Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [link to tags on this repository](/tags).

### Tests

```sh
drake test
```

### Style guide

```sh
drake format
drake lint
```

Make sure to use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).

### Pull request

**Please PR to the `dev` branch!**
Then follow the [pull request template](.github/PULL_REQUEST_TEMPLATE/pull_request.md).

### Deploying / Publishing

Submit a pull request after running `drake dev` to ensure it runs correctly.
The module is automatically published to nest.land when a new release is published on github.
39 changes: 39 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!-- Make sure you have read the contribution guide!
https://github.com/nestdotland/template/tree/master/.github/CONTRIBUTING.md
-->

# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

- [ ] Test A
- [ ] Test B

**Test Configuration**:
* OS:
* Version:

# Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
10 changes: 8 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ jobs:
- name: Setup Deno
uses: denolib/setup-deno@v2

- name: Setup Drake
run: deno run -A Drakefile.ts setup-github-actions

- name: Check formatting
run: deno fmt --check
run: drake check-format

lint:
name: deno lint
Expand All @@ -31,6 +34,9 @@ jobs:

- name: Setup Deno
uses: denolib/setup-deno@v2

- name: Setup Drake
run: deno run -A Drakefile.ts setup-github-actions

- name: Run linter
run: deno lint --unstable
run: drake lint
17 changes: 9 additions & 8 deletions .github/workflows/ship.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,22 @@ on:
jobs:
release:
runs-on: ubuntu-latest

env:
NESTAPIKEY: ${{ secrets.NESTAPIKEY }}

steps:
- name: Setup repo
uses: actions/checkout@v2

- name: Setup Deno
uses: denolib/setup-deno@v2

- name: Setup Drake
run: deno run -A Drakefile.ts setup-github-actions

- name: Get eggs version
run: |
deno run ./src/version/printVersion.ts
echo "::set-env name=EGGS_VERSION::$(deno run ./src/version/printVersion.ts)"
run: drake get-version

- name: Draft release
id: draft_release
Expand All @@ -30,8 +35,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish eggs
# TODO(@oganexon): remove --description after next release
run: |
deno run -A --unstable mod.ts link ${{ secrets.NESTAPIKEY }}
deno run -A --unstable mod.ts publish eggs --ignore "extends .gitignore" --version ${{ env.EGGS_VERSION }} --description "The CLI used to publish and update modules in nest.land."
run: drake ship
39 changes: 18 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,27 @@ jobs:
matrix:
os: [macOS-latest, windows-latest, ubuntu-latest]

env:
NESTAPIKEY: ${{ secrets.NESTAPIKEY }}

steps:
- name: Setup repo
uses: actions/checkout@v2

- name: Setup Deno
uses: denolib/setup-deno@v2

- name: Run tests
run: deno test -A --unstable
- name: Setup Drake
run: deno run -A Drakefile.ts setup-github-actions

- name: Get eggs version
run: |
deno run ./src/version/printVersion.ts
echo "::set-env name=EGGS_VERSION::$(deno run ./src/version/printVersion.ts)"
- name: Run tests
run: drake test

- name: Eggs release test
run: |
deno run -A --unstable mod.ts link ${{ secrets.NESTAPIKEY || 'null' }} -do
deno run -A --unstable mod.ts publish eggs --dry-run -do --ignore "extends .gitignore" --version ${{ env.EGGS_VERSION }}
- uses: actions/upload-artifact@v2
run: drake dry-ship

- name: Upload debug file
uses: actions/upload-artifact@v2
if: failure()
with:
name: eggs-debug
Expand All @@ -64,20 +64,17 @@ jobs:
with:
deno-version: nightly

- name: Run tests
run: deno test -A --unstable
- name: Setup Drake
run: deno run -A Drakefile.ts setup-github-actions

- name: Get eggs version
run: |
deno run ./src/version/printVersion.ts
echo "::set-env name=EGGS_VERSION::$(deno run ./src/version/printVersion.ts)"
- name: Run tests
run: drake test

- name: Eggs release test
run: |
deno run -A --unstable mod.ts link ${{ secrets.NESTAPIKEY || 'null' }} -do
deno run -A --unstable mod.ts publish eggs --dry-run -do --ignore "extends .gitignore" --version ${{ env.EGGS_VERSION }}
run: drake dry-ship

- uses: actions/upload-artifact@v2
- name: Upload debug file
uses: actions/upload-artifact@v2
if: failure()
with:
name: eggs-debug
Expand Down
10 changes: 0 additions & 10 deletions CHANGELOG.md

This file was deleted.

Loading

0 comments on commit f5ff3cc

Please sign in to comment.