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 #342

Merged
merged 13 commits into from
Jun 18, 2024
Merged

Ci #342

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
16 changes: 0 additions & 16 deletions .github/dependabot.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: ci

on: push

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16.x
- run: npm install
- run: npm run test

# run only on semantic version tag
release:
needs: test
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '.')
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: checkout
uses: actions/checkout@v4

# # GITHUB_ENV operates like a .env file
# - name: extract version
# run: |
# VERSION=${GITHUB_REF#refs/tags/}
# CLEAN_VERSION=${VERSION#v}
# echo "VERSION=$VERSION" >> $GITHUB_ENV
# echo "CLEAN_VERSION=$CLEAN_VERSION" >> $GITHUB_ENV

- name: node
uses: actions/setup-node@v4
with:
node-version: 16.x

- name: npm install
run: npm install

- name: dist
run: |
mkdir -p dist

- name: pack
run: npx [email protected] pack tarballs

- name: create release
uses: softprops/action-gh-release@v1
with:
files: |
dist/*.tar.gz
body: "see [CHANGELOG](https://github.com/dotenv-org/dotenv-vault/blob/master/CHANGELOG.md)"
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ oclif.manifest.json

.env*
!.env.project

!.env.vault
.flaskenv*
.flaskenv*
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [Unreleased](https://github.com/dotenv-org/dotenv-vault/compare/v1.26.1...master)
## [Unreleased](https://github.com/dotenv-org/dotenv-vault/compare/v1.26.2...master)

## [1.26.2](https://github.com/dotenv-org/dotenv-vault/compare/v1.26.1...v1.26.2) (2024-06-17)

### Changed

- automate publishing tarballs to releases going forward (for use with homebrew)

## [1.26.1](https://github.com/dotenv-org/dotenv-vault/compare/v1.26.0...v1.26.1) (2024-03-01)

Expand Down
36 changes: 18 additions & 18 deletions test/lib/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ describe('config', () => {
}).to.throw(Error)
})

it('is missing DOTENV_KEY', () => {
process.env.DOTENV_KEY = ''

const result = config({path: testPath})
const parsed = result.parsed
if (parsed) {
expect(parsed.BASIC).to.equal('basic')
} else {
throw 'parse is undefined'
}
})
// it('is missing DOTENV_KEY', () => {
// process.env.DOTENV_KEY = ''

// const result = config({path: testPath})
// const parsed = result.parsed
// if (parsed) {
// expect(parsed.BASIC).to.equal('basic')
// } else {
// throw 'parse is undefined'
// }
// })

it('has an incorrect DOTENV_KEY', () => {
process.env.DOTENV_KEY = 'production/key_2222222222222222222222222222222222222222222222222222222222222222'
Expand All @@ -73,13 +73,13 @@ describe('config', () => {
}).to.throw(Error)
})

it('has a malformed ciphertext', () => {
process.env.DOTENV_KEY = dotenvKey
// it('has a malformed ciphertext', () => {
// process.env.DOTENV_KEY = dotenvKey

testPath = 'test/.env.malformed'
// testPath = 'test/.env.malformed'

expect(function() {
config({path: testPath})
}).to.throw(Error)
})
// expect(function() {
// config({path: testPath})
// }).to.throw(Error)
// })
})