Skip to content

Commit

Permalink
Chore: use correct ci dependency versions (#236)
Browse files Browse the repository at this point in the history
* chore: correctly prettier markdown and yaml files

* chore: run prettier on yml files

* chore: run actions on latest operating system versions

* chore: use latest major versions of depended on actions

* fix: correct the CD E2E Node workflow to work
  • Loading branch information
ThisIsMissEm authored Apr 14, 2022
1 parent 9c4caa4 commit c6283a0
Show file tree
Hide file tree
Showing 9 changed files with 528 additions and 530 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- cron: "40 10 * * *"

jobs:
audit:
uses: inrupt/javascript-style-configs/.github/workflows/reusable-audit.yml@main
secrets:
WEBHOOK_E2E_FAILURE: ${{ secrets.WEBHOOK_E2E_FAILURE }}
audit:
uses: inrupt/javascript-style-configs/.github/workflows/reusable-audit.yml@main
secrets:
WEBHOOK_E2E_FAILURE: ${{ secrets.WEBHOOK_E2E_FAILURE }}
38 changes: 19 additions & 19 deletions .github/workflows/cd-teardown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ env:
CI: true
jobs:
unpublish-npm:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
if: github.event.ref_type == 'branch'
steps:
- name: Prepare for unpublication from npm
uses: actions/setup-node@v2.1.5
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Determine npm tag
# Remove non-alphanumeric characters
# See https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
run: echo "TAG_SLUG=$(echo "${{ github.event.ref }}" | tr -cd '[:alnum:]-')" >> $GITHUB_ENV
- name: Remove npm tag for the deleted branch
run: |
# Unfortunately GitHub Actions does not currently let us do something like
# if: secrets.NPM_TOKEN != ''
# so simply skip the command if the env var is not set:
if [ -n $NODE_AUTH_TOKEN ]; then npm dist-tag rm @inrupt/solid-client-notifications $TAG_SLUG; fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: echo "Package tag [$TAG_SLUG] unpublished."
- name: Prepare for unpublication from npm
uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- name: Determine npm tag
# Remove non-alphanumeric characters
# See https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
run: echo "TAG_SLUG=$(echo "${{ github.event.ref }}" | tr -cd '[:alnum:]-')" >> $GITHUB_ENV
- name: Remove npm tag for the deleted branch
run: |
# Unfortunately GitHub Actions does not currently let us do something like
# if: secrets.NPM_TOKEN != ''
# so simply skip the command if the env var is not set:
if [ -n $NODE_AUTH_TOKEN ]; then npm dist-tag rm @inrupt/solid-client-notifications $TAG_SLUG; fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: echo "Package tag [$TAG_SLUG] unpublished."
428 changes: 213 additions & 215 deletions .github/workflows/cd.yml

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ jobs:
strategy:
matrix:
# Available OS's: https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
os: [ubuntu-20.04, windows-2019, macos-10.15]
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [16.x, 14.x, 12.x]
steps:
- uses: actions/checkout@v2.3.4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.1.5
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v2.1.5
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-node${{ runner.node-version }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm run build
- run: npm test
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-node${{ runner.node-version }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm run build
- run: npm test

lint:
# FIXME: use a fixed version after it has been released
Expand Down
74 changes: 37 additions & 37 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ name: "Static Application security Testing (CodeQL)"
on:
push:
branches:
- '*'
- "*"
pull_request:
# The branches below must be a subset of the branches above
branches:
- main
- main
schedule:
- cron: '0 12 * * 6'
- cron: "0 12 * * 6"

jobs:
analyze:
Expand All @@ -26,48 +26,48 @@ jobs:
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['javascript']
language: ["javascript"]
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2.3.4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
- name: Checkout repository
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
#- name: Autobuild
# uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
#- name: Autobuild
# uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
62 changes: 31 additions & 31 deletions .github/workflows/e2e-browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,34 @@ jobs:
# this library still implements the legacy one.
environment-name: ["ESS Production"]
steps:
- uses: actions/checkout@v2.3.4
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: npm
- run: npm ci
- run: npm run build
- run: npx playwright install --with-deps
- run: npm run test:e2e:browser:setup
- run: npm run test:e2e:browser
env:
E2E_TEST_ENVIRONMENT: ${{ matrix.environment-name }}
E2E_TEST_UI_LOGIN: ${{ secrets.E2E_TEST_UI_LOGIN }}
E2E_TEST_UI_PASSWORD: ${{ secrets.E2E_TEST_UI_PASSWORD }}
E2E_TEST_NOTIFICATION_PROTOCOL: ${{ secrets.E2E_TEST_NOTIFICATION_PROTOCOL }}
E2E_TEST_NOTIFICATION_GATEWAY: ${{ secrets.E2E_TEST_NOTIFICATION_GATEWAY }}
E2E_TEST_IDP: ${{ secrets.E2E_TEST_IDP }}
- name: Archive browser-based end-to-end test request logs
uses: actions/upload-artifact@v3
if: failure()
continue-on-error: true
with:
name: playwright-output
path: e2e/browser/test/test-results/
- name: Archive production artifacts
uses: actions/upload-artifact@v3
continue-on-error: true
with:
name: dist
path: dist
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: npm
- run: npm ci
- run: npm run build
- run: npx playwright install --with-deps
- run: npm run test:e2e:browser:setup
- run: npm run test:e2e:browser
env:
E2E_TEST_ENVIRONMENT: ${{ matrix.environment-name }}
E2E_TEST_UI_LOGIN: ${{ secrets.E2E_TEST_UI_LOGIN }}
E2E_TEST_UI_PASSWORD: ${{ secrets.E2E_TEST_UI_PASSWORD }}
E2E_TEST_NOTIFICATION_PROTOCOL: ${{ secrets.E2E_TEST_NOTIFICATION_PROTOCOL }}
E2E_TEST_NOTIFICATION_GATEWAY: ${{ secrets.E2E_TEST_NOTIFICATION_GATEWAY }}
E2E_TEST_IDP: ${{ secrets.E2E_TEST_IDP }}
- name: Archive browser-based end-to-end test request logs
uses: actions/upload-artifact@v3
if: failure()
continue-on-error: true
with:
name: playwright-output
path: e2e/browser/test/test-results/
- name: Archive production artifacts
uses: actions/upload-artifact@v3
continue-on-error: true
with:
name: dist
path: dist
94 changes: 47 additions & 47 deletions .github/workflows/e2e-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,50 +22,50 @@ jobs:
# NSS does not support static client registration, which we rely on for testing.
environment-name: ["ESS Production", "ESS Dev-Next"]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- run: npm run build
- run: npm run test:e2e:node
env:
E2E_TEST_NOTIFICATION_GATEWAY: ${{ secrets.E2E_TEST_NOTIFICATION_GATEWAY }}
E2E_TEST_NOTIFICATION_PROTOCOL: ${{ secrets.E2E_TEST_NOTIFICATION_PROTOCOL }}
E2E_TEST_IDP: ${{ secrets.E2E_TEST_IDP }}
E2E_TEST_CLIENT_ID: ${{ secrets.E2E_TEST_CLIENT_ID }}
E2E_TEST_CLIENT_SECRET: ${{ secrets.E2E_TEST_CLIENT_SECRET }}
E2E_TEST_ENVIRONMENT: ${{ matrix.environment-name }}
- name: Add status check with successful test result
id: set-status-check-success
uses: octokit/request-action@v2.1.0
with:
route: POST /repos/:repository/statuses/:ref
repository: ${{ github.repository }}
ref: ${{ github.sha }}
state: success
context: 'End-to-end tests (node)'
description: 'Node.js notification end-to-end tests'
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}?check_suite_focus=true
# The deployment runs in parallel with CI, so status checks will never have succeeded yet:
required_contexts: "[]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Add status check with failed test result
id: set-status-check-failure
if: failure()
uses: octokit/request-action@v2.1.0
with:
route: POST /repos/:repository/statuses/:ref
repoitory: ${{ github.repository }}
ref: ${{ github.sha }}
state: failure
context: 'End-to-end tests (node)'
description: 'Node.js notification end-to-end tests'
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}?check_suite_focus=true
# The deployment runs in parallel with CI, so status checks will never have succeeded yet:
required_contexts: "[]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- run: npm run build
- run: npm run test:e2e:node
env:
E2E_TEST_NOTIFICATION_GATEWAY: ${{ secrets.E2E_TEST_NOTIFICATION_GATEWAY }}
E2E_TEST_NOTIFICATION_PROTOCOL: ${{ secrets.E2E_TEST_NOTIFICATION_PROTOCOL }}
E2E_TEST_IDP: ${{ secrets.E2E_TEST_IDP }}
E2E_TEST_CLIENT_ID: ${{ secrets.E2E_TEST_CLIENT_ID }}
E2E_TEST_CLIENT_SECRET: ${{ secrets.E2E_TEST_CLIENT_SECRET }}
E2E_TEST_ENVIRONMENT: ${{ matrix.environment-name }}
- name: Add status check with successful test result
id: set-status-check-success
uses: octokit/request-action@v2.x
with:
route: POST /repos/:repository/statuses/:ref
repository: ${{ github.repository }}
ref: ${{ github.sha }}
state: success
context: "End-to-end tests (node)"
description: "Node.js notification end-to-end tests"
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}?check_suite_focus=true
# The deployment runs in parallel with CI, so status checks will never have succeeded yet:
required_contexts: "[]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Add status check with failed test result
id: set-status-check-failure
if: failure()
uses: octokit/request-action@v2.x
with:
route: POST /repos/:repository/statuses/:ref
repoitory: ${{ github.repository }}
ref: ${{ github.sha }}
state: failure
context: "End-to-end tests (node)"
description: "Node.js notification end-to-end tests"
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}?check_suite_focus=true
# The deployment runs in parallel with CI, so status checks will never have succeeded yet:
required_contexts: "[]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
Loading

1 comment on commit c6283a0

@vercel
Copy link

@vercel vercel bot commented on c6283a0 Apr 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.