Skip to content

Commit

Permalink
Merge e138d83 into 0d9e5bb
Browse files Browse the repository at this point in the history
  • Loading branch information
activescott committed Jul 22, 2022
2 parents 0d9e5bb + e138d83 commit ae6c804
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 109 deletions.
5 changes: 2 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ version: 2
updates:
# docs v2 https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuration-options-for-dependency-updates
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
# Check for npm updates on Sundays
day: "saturday"
day: "friday"
allow:
- dependency-type: "direct"
directory: "/"
commit-message:
# for production deps, prefix commit messages with "fix" (trigger a patch release)
prefix: "fix"
Expand Down
104 changes: 20 additions & 84 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,89 +1,25 @@
name: build

# We want pushes to main, beta, and alpha to trigger a publish to npm for the corresponding npm dist-tag.
# Any pull request targeting deploy branches should run all tests.
on:
push:
branches: [main]
branches: [main, beta, alpha]

pull_request:
branches: [main]
branches: [main, beta, alpha]

jobs:
lint:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- name: "Use Node.js (deliberately not using matrix)"
uses: actions/setup-node@v1
with:
node-version: v12.x

- name: install dependencies
run: |
npm i
- name: lint
run: |
npm run lint
build_and_test:
runs-on: ubuntu-20.04
strategy:
matrix:
node: [10, 12, 14]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}

- name: install dependencies
run: |
npm i
- name: test
env:
CI_NODE_VERSION: ${{ matrix.node }}
run: |
npm run test
- name: publish coverage
uses: coverallsapp/github-action@master
continue-on-error: true
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: nodejs-${{ matrix.node }}
parallel: true

finish_tests:
needs: build_and_test
runs-on: ubuntu-20.04
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
continue-on-error: true
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

deploy_package:
needs: finish_tests
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Use Node.js v12.x
uses: actions/setup-node@v1
with:
node-version: v12.x

#- name: debug deploy_package
# uses: actions/bin/debug@master

- name: deploy via semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npx semantic-release@17
test:
uses: activescott/github-actions-workflows/.github/workflows/npm-tester.yml@npm-tester-v4
with:
package_dir: ./
node_versions: "[14, 16, 18]"
do_coveralls: true

publish:
if: ${{ github.event_name != 'pull_request' }}
needs: [test]
uses: activescott/github-actions-workflows/.github/workflows/npm-publisher.yml@npm-publisher-v4
with:
package_dir: /
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
19 changes: 0 additions & 19 deletions .github/workflows/dependabot-validate.yml

This file was deleted.

2 changes: 1 addition & 1 deletion examples/basic/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ service: basic-example

provider:
name: aws
runtime: nodejs10.x
runtime: nodejs14.x
region: us-west-2

functions:
Expand Down
2 changes: 1 addition & 1 deletion examples/comprehensive/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ service: basic-example # NOTE: update this with your service name

provider:
name: aws
runtime: nodejs10.x
runtime: nodejs14.x
region: us-west-2

environment:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"tdd"
],
"engines": {
"node": ">=6"
"node": ">=14"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit ae6c804

Please sign in to comment.