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

update google provider version, deprecate old stuff #312

Open
wants to merge 4 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
91 changes: 45 additions & 46 deletions .github/workflows/integrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,28 @@ env:
FORCE_COLOR: 1

jobs:
linuxNode14:
name: '[Linux] Node.js 14: Unit tests '

linuxNode20:
name: '[Linux] Node.js 20: Unit tests'
runs-on: ubuntu-latest
steps:
- name: Resolve last validated commit hash (for `git diff` purposes)
env:
# See https://github.com/serverlessinc/setup-cicd-resources
GET_LAST_VALIDATED_COMMIT_HASH_URL: ${{ secrets.GET_LAST_VALIDATED_COMMIT_HASH_URL }}
PUT_LAST_VALIDATED_COMMIT_HASH_URL: ${{ secrets.PUT_LAST_VALIDATED_COMMIT_HASH_URL }}
run: |
curl -f "$GET_LAST_VALIDATED_COMMIT_HASH_URL" -o /home/runner/last-validated-commit-hash || :
curl -X PUT -H "User-Agent:" -H "Accept:" -H "Content-Type:" -d "$GITHUB_SHA" "$PUT_LAST_VALIDATED_COMMIT_HASH_URL"
- name: Store last validated commit hash (as it's to be used in other job)
uses: actions/upload-artifact@v2
with:
name: last-validated-commit-hash
path: /home/runner/last-validated-commit-hash

- name: Checkout repository
uses: actions/checkout@v2

- name: Install Node.js and npm
uses: actions/setup-node@v1
with:
node-version: 14.x
registry-url: https://registry.npmjs.org

- name: Retrieve dependencies from cache
id: cacheNpm
uses: actions/cache@v2
with:
path: |
~/.npm
node_modules
key: npm-v14-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
restore-keys: npm-v14-${{ runner.os }}-${{ github.ref }}-
key: npm-v20-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
restore-keys: npm-v20-${{ runner.os }}-${{ github.ref }}-

- name: Install Node.js and npm
uses: actions/setup-node@v1
with:
node-version: 20.x

- name: Install dependencies
if: steps.cacheNpm.outputs.cache-hit != 'true'
Expand All @@ -56,8 +42,8 @@ jobs:
- name: Unit tests
run: npm test

linuxNode16:
name: '[Linux] Node.js 16: Unit tests'
linuxNode18:
name: '[Linux] Node.js 18: Unit tests'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -70,13 +56,13 @@ jobs:
path: |
~/.npm
node_modules
key: npm-v16-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
restore-keys: npm-v16-${{ runner.os }}-${{ github.ref }}-
key: npm-v18-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
restore-keys: npm-v18-${{ runner.os }}-${{ github.ref }}-

- name: Install Node.js and npm
uses: actions/setup-node@v1
with:
node-version: 16.x
node-version: 18.x

- name: Install dependencies
if: steps.cacheNpm.outputs.cache-hit != 'true'
Expand All @@ -86,8 +72,8 @@ jobs:
- name: Unit tests
run: npm test

linuxNode12:
name: '[Linux] Node.js 12: Unit tests'
linuxNode16:
name: '[Linux] Node.js 16: Unit tests'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -100,13 +86,13 @@ jobs:
path: |
~/.npm
node_modules
key: npm-v12-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
restore-keys: npm-v12-${{ runner.os }}-${{ github.ref }}-
key: npm-v16-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
restore-keys: npm-v16-${{ runner.os }}-${{ github.ref }}-

- name: Install Node.js and npm
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x

- name: Install dependencies
if: steps.cacheNpm.outputs.cache-hit != 'true'
Expand All @@ -116,29 +102,42 @@ jobs:
- name: Unit tests
run: npm test

linuxNode10:
name: '[Linux] Node.js v10: Unit tests'
linuxNode14:
name: '[Linux] Node.js 14: Unit tests '
runs-on: ubuntu-latest
steps:
- name: Resolve last validated commit hash (for `git diff` purposes)
env:
# See https://github.com/serverlessinc/setup-cicd-resources
GET_LAST_VALIDATED_COMMIT_HASH_URL: ${{ secrets.GET_LAST_VALIDATED_COMMIT_HASH_URL }}
PUT_LAST_VALIDATED_COMMIT_HASH_URL: ${{ secrets.PUT_LAST_VALIDATED_COMMIT_HASH_URL }}
run: |
curl -f "$GET_LAST_VALIDATED_COMMIT_HASH_URL" -o /home/runner/last-validated-commit-hash || :
curl -X PUT -H "User-Agent:" -H "Accept:" -H "Content-Type:" -d "$GITHUB_SHA" "$PUT_LAST_VALIDATED_COMMIT_HASH_URL"
- name: Store last validated commit hash (as it's to be used in other job)
uses: actions/upload-artifact@v2
with:
name: last-validated-commit-hash
path: /home/runner/last-validated-commit-hash

- name: Checkout repository
uses: actions/checkout@v2

- name: Install Node.js and npm
uses: actions/setup-node@v1
with:
node-version: 14.x
registry-url: https://registry.npmjs.org

- name: Retrieve dependencies from cache
id: cacheNpm
uses: actions/cache@v2
with:
path: |
~/.npm
node_modules
key: npm-v10-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
restore-keys: |
npm-v10-${{ runner.os }}-${{ github.ref }}-
npm-v10-${{ runner.os }}-refs/heads/master-

- name: Install Node.js and npm
uses: actions/setup-node@v1
with:
node-version: 10.x
key: npm-v14-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
restore-keys: npm-v14-${{ runner.os }}-${{ github.ref }}-

- name: Install dependencies
if: steps.cacheNpm.outputs.cache-hit != 'true'
Expand All @@ -151,7 +150,7 @@ jobs:
tagIfNewVersion:
name: ubuntu-latest
runs-on: ubuntu-latest
needs: [linuxNode14, linuxNode16, linuxNode12, linuxNode10]
needs: [linuxNode20, linuxNode18, linuxNode16, linuxNode14]
timeout-minutes: 30 # Default is 360
steps:
- name: Checkout repository
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
path: |
~/.npm
node_modules
key: npm-v14-${{ runner.os }}-refs/heads/master-${{ hashFiles('package.json') }}
key: npm-v20-${{ runner.os }}-refs/heads/master-${{ hashFiles('package.json') }}

- name: Install Node.js and npm
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 20.x
registry-url: https://registry.npmjs.org

- name: Publish new version
Expand Down
99 changes: 50 additions & 49 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,13 @@ env:
FORCE_COLOR: 1

jobs:
linuxNode14:
name: '[Linux] Node.js 14: Lint, Formatting, Eventual Commitlint, Eventual Changelog, Unit tests'

linuxNode20:
name: '[Linux] Node.js 20: Unit tests'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# For commitlint purpose ensure to have complete list of PR commits
# It's loose and imperfect assumption that PR has no more than 30 commits
fetch-depth: 30

- name: Retrieve last master commit (for `git diff` purposes)
run: |
git checkout -b pr
git fetch --prune --depth=30 origin +refs/heads/master:refs/remotes/origin/master
git checkout master
git checkout pr

- name: Retrieve dependencies from cache
id: cacheNpm
Expand All @@ -36,40 +26,26 @@ jobs:
path: |
~/.npm
node_modules
key: npm-v14-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
key: npm-v20-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
restore-keys: |
npm-v14-${{ runner.os }}-${{ github.ref }}-
npm-v14-${{ runner.os }}-refs/heads/master-
npm-v20-${{ runner.os }}-${{ github.ref }}-
npm-v20-${{ runner.os }}-refs/heads/master-

- name: Install Node.js and npm
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 20.x

- name: Install dependencies
if: steps.cacheNpm.outputs.cache-hit != 'true'
run: |
npm update --no-save
npm update --save-dev --no-save
- name: Validate formatting
run: npm run prettier-check:updated
- name: Validate lint rules
run: npm run lint:updated
- name: Validate commit messages
if: github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id
run: npx commitlint -f master
- name: Validate changelog (if new version)
run: |
NEW_VERSION=`git diff -U0 master package.json | grep '"version": "' | tail -n 1 | grep -oE "[0-9]+\.[0-9]+\.[0-9]+"` || :
if [ -n "$NEW_VERSION" ];
then
npx dump-release-notes-from-cc-changelog $NEW_VERSION
fi
- name: Unit tests
run: npm test

linuxNode16:
name: '[Linux] Node.js 16: Unit tests'
linuxNode18:
name: '[Linux] Node.js v18: Unit tests'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -82,15 +58,15 @@ jobs:
path: |
~/.npm
node_modules
key: npm-v16-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
key: npm-v18-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
restore-keys: |
npm-v16-${{ runner.os }}-${{ github.ref }}-
npm-v16-${{ runner.os }}-refs/heads/master-
npm-v18-${{ runner.os }}-${{ github.ref }}-
npm-v18-${{ runner.os }}-refs/heads/master-

- name: Install Node.js and npm
uses: actions/setup-node@v1
with:
node-version: 16.x
node-version: 18.x

- name: Install dependencies
if: steps.cacheNpm.outputs.cache-hit != 'true'
Expand All @@ -100,8 +76,8 @@ jobs:
- name: Unit tests
run: npm test

linuxNode12:
name: '[Linux] Node.js 12: Unit tests'
linuxNode16:
name: '[Linux] Node.js 16: Unit tests'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -114,15 +90,15 @@ jobs:
path: |
~/.npm
node_modules
key: npm-v12-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
key: npm-v16-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
restore-keys: |
npm-v12-${{ runner.os }}-${{ github.ref }}-
npm-v12-${{ runner.os }}-refs/heads/master-
npm-v16-${{ runner.os }}-${{ github.ref }}-
npm-v16-${{ runner.os }}-refs/heads/master-

- name: Install Node.js and npm
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x

- name: Install dependencies
if: steps.cacheNpm.outputs.cache-hit != 'true'
Expand All @@ -132,12 +108,23 @@ jobs:
- name: Unit tests
run: npm test

linuxNode10:
name: '[Linux] Node.js v10: Unit tests'
linuxNode14:
name: '[Linux] Node.js 14: Lint, Formatting, Eventual Commitlint, Eventual Changelog, Unit tests'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# For commitlint purpose ensure to have complete list of PR commits
# It's loose and imperfect assumption that PR has no more than 30 commits
fetch-depth: 30

- name: Retrieve last master commit (for `git diff` purposes)
run: |
git checkout -b pr
git fetch --prune --depth=30 origin +refs/heads/master:refs/remotes/origin/master
git checkout master
git checkout pr

- name: Retrieve dependencies from cache
id: cacheNpm
Expand All @@ -146,20 +133,34 @@ jobs:
path: |
~/.npm
node_modules
key: npm-v10-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
key: npm-v14-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
restore-keys: |
npm-v10-${{ runner.os }}-${{ github.ref }}-
npm-v10-${{ runner.os }}-refs/heads/master-
npm-v14-${{ runner.os }}-${{ github.ref }}-
npm-v14-${{ runner.os }}-refs/heads/master-

- name: Install Node.js and npm
uses: actions/setup-node@v1
with:
node-version: 10.x
node-version: 14.x

- name: Install dependencies
if: steps.cacheNpm.outputs.cache-hit != 'true'
run: |
npm update --no-save
npm update --save-dev --no-save
- name: Validate formatting
run: npm run prettier-check:updated
- name: Validate lint rules
run: npm run lint:updated
- name: Validate commit messages
if: github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id
run: npx commitlint -f master
- name: Validate changelog (if new version)
run: |
NEW_VERSION=`git diff -U0 master package.json | grep '"version": "' | tail -n 1 | grep -oE "[0-9]+\.[0-9]+\.[0-9]+"` || :
if [ -n "$NEW_VERSION" ];
then
npx dump-release-notes-from-cc-changelog $NEW_VERSION
fi
- name: Unit tests
run: npm test
Loading