Skip to content

Commit

Permalink
Merge branch 'main' into release/v2.2.2
Browse files Browse the repository at this point in the history
Signed-off-by: Frederik Prijck <[email protected]>
  • Loading branch information
frederikprijck authored Oct 31, 2023
2 parents ce9b39a + 11e6636 commit 5bbf80d
Show file tree
Hide file tree
Showing 35 changed files with 648 additions and 674 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Bug Report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ body:
options:
- label: The issue can be reproduced in the [auth0-react sample app](https://github.com/auth0-samples/auth0-react-samples/tree/master/Sample-01) (or N/A).
required: true
- label: I have looked into the [Readme](https://github.com/auth0/auth0-react#readme), [Examples](https://github.com/auth0/auth0-react/blob/master/EXAMPLES.md), and [FAQ](https://github.com/auth0/auth0-react/blob/master/FAQ.md) and have not found a suitable solution or answer.
- label: I have looked into the [Readme](https://github.com/auth0/auth0-react#readme), [Examples](https://github.com/auth0/auth0-react/blob/main/EXAMPLES.md), and [FAQ](https://github.com/auth0/auth0-react/blob/main/FAQ.md) and have not found a suitable solution or answer.
required: true
- label: I have looked into the [API documentation](https://auth0.github.io/auth0-react/) and have not found a suitable solution or answer.
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Feature Request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
attributes:
label: Checklist
options:
- label: I have looked into the [Readme](https://github.com/auth0/auth0-react#readme), [Examples](https://github.com/auth0/auth0-react/blob/master/EXAMPLES.md), and [FAQ](https://github.com/auth0/auth0-react/blob/master/FAQ.md) and have not found a suitable solution or answer.
- label: I have looked into the [Readme](https://github.com/auth0/auth0-react#readme), [Examples](https://github.com/auth0/auth0-react/blob/main/EXAMPLES.md), and [FAQ](https://github.com/auth0/auth0-react/blob/main/FAQ.md) and have not found a suitable solution or answer.
required: true
- label: I have looked into the [API documentation](https://auth0.github.io/auth0-react/) and have not found a suitable solution or answer.
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ contact_links:
url: https://community.auth0.com
about: Discuss this SDK in the Auth0 Community forums
- name: FAQ
url: https://github.com/auth0/auth0-react/blob/master/FAQ.md
url: https://github.com/auth0/auth0-react/blob/main/FAQ.md
about: Read the FAQ to get answers to common issues
- name: SDK API Documentation
url: https://auth0.github.io/auth0-react/
Expand Down
76 changes: 0 additions & 76 deletions .github/actions/integration/action.yml

This file was deleted.

13 changes: 10 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: "daily"
interval: 'daily'
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
8 changes: 4 additions & 4 deletions .github/workflows/browserstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ on:
- synchronize
push:
branches:
- master
- main

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

env:
NODE_VERSION: 18
Expand All @@ -42,7 +42,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
Expand All @@ -54,7 +54,7 @@ jobs:

- name: Run tests
shell: bash
run: npx concurrently --raw --kill-others --success first "npm:start" "wait-on http://127.0.0.1:3000/ && browserstack-cypress run --build-name ${{ github.event.pull_request.head.sha || github.ref }} --no-wrap --specs "cypress/integration/smoke-bs.test.ts""
run: npx concurrently --raw --kill-others --success first "npm:start" "wait-on http://127.0.0.1:3000/ && browserstack-cypress run --build-name ${{ github.event.pull_request.head.sha || github.ref }} --no-wrap --specs "cypress/e2e/smoke-bs.cy.ts""
env:
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- synchronize
push:
branches:
- master
- main
- beta
schedule:
- cron: '37 10 * * 2'
Expand All @@ -20,7 +20,7 @@ permissions:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
analyze:
Expand Down
105 changes: 47 additions & 58 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -1,87 +1,76 @@
name: Integration Tests

on:
# merge_group:
merge_group:
workflow_dispatch:
# pull_request:
# branches:
# - master
# push:
# branches:
# - master
pull_request_target:
types:
- opened
- synchronize
push:
branches:
- main

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

env:
NODE_VERSION: 18
# Mock user credentials for Cypress tests
CYPRESS_USER_EMAIL: [email protected]
CYPRESS_USER_PASSWORD: mockpassword

jobs:
test-react-router:
name: Run react-router tests
runs-on: ubuntu-latest

env:
SKIP_PREFLIGHT_CHECK: true
REACT_APP_DOMAIN: your-tenant.auth0.com
REACT_APP_CLIENT_ID: yourclientid
REACT_APP_AUDIENCE: https://api.example.com/users
REACT_APP_API_PORT: 3001

authorize:
name: Authorize
environment: ${{ github.actor != 'dependabot[bot]' && github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- run: true

- name: Run integration test
uses: ./.github/actions/integration
with:
integration: 'cra-react-router'
node: ${{ env.NODE_VERSION }}

test-gatsby:
name: Run Gatsby tests
test-examples:
needs: authorize # Require approval before running on forked pull requests
name: Run example tests
runs-on: ubuntu-latest

env:
GATSBY_DOMAIN: your-tenant.auth0.com
GATSBY_CLIENT_ID: yourclientid
GATSBY_AUDIENCE: https://api.example.com/users
GATSBY_API_PORT: 3001
SKIP_PREFLIGHT_CHECK: true
CYPRESS_USER_EMAIL: ${{secrets.CYPRESS_USER_EMAIL}}
CYPRESS_USER_PASSWORD: ${{secrets.CYPRESS_USER_PASSWORD}}
REACT_APP_DOMAIN: ${{secrets.TEST_DOMAIN}}
REACT_APP_CLIENT_ID: ${{secrets.TEST_CLIENT_ID}}
REACT_APP_AUDIENCE: ${{secrets.TEST_AUDIENCE}}
GATSBY_DOMAIN: ${{secrets.TEST_DOMAIN}}
GATSBY_CLIENT_ID: ${{secrets.TEST_CLIENT_ID}}
GATSBY_AUDIENCE: ${{secrets.TEST_AUDIENCE}}
NEXT_PUBLIC_DOMAIN: ${{secrets.TEST_DOMAIN}}
NEXT_PUBLIC_CLIENT_ID: ${{secrets.TEST_CLIENT_ID}}
NEXT_PUBLIC_AUDIENCE: ${{secrets.TEST_AUDIENCE}}
DOMAIN: ${{secrets.TEST_DOMAIN}}
AUDIENCE: ${{secrets.TEST_AUDIENCE}}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run integration test
uses: ./.github/actions/integration
with:
integration: 'gatsby-app'
node: ${{ env.NODE_VERSION }}
dotenv: '.env.development.sample'
ref: ${{ github.event.pull_request.head.sha || github.ref }}

test-nextjs:
name: Run NextJS tests
runs-on: ubuntu-latest
- name: Install dependencies
run: npm ci

env:
NEXT_PUBLIC_DOMAIN: your-tenant.auth0.com
NEXT_PUBLIC_CLIENT_ID: yourclientid
NEXT_PUBLIC_AUDIENCE: https://api.example.com/users
NEXT_PUBLIC_API_PORT: 3001
- name: Build SDK
run: npm run build

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install examples
run: npm run install:examples

- name: Run integration test
uses: ./.github/actions/integration
with:
integration: 'nextjs-app'
node: ${{ env.NODE_VERSION }}
- name: Run integration test (CRA)
run: npm run test:cra

- name: Run integration test (NextJS)
run: npm run test:nextjs

- name: Run integration test (Gatsby)
run: npm run test:gatsby
34 changes: 3 additions & 31 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branch:
description: The branch to release from
required: true
default: master
default: main
version:
description: The version being published. This should be a valid semver version, such as `1.0.0`.
required: true
Expand All @@ -20,7 +20,6 @@ on:
permissions:
contents: read
id-token: write # For publishing to NPM with provenance. Allows developers to run `npm audit signatures` and verify release signature of SDK. @see https://github.blog/2023-04-19-introducing-npm-package-provenance/
packages: write # For cross-publishing to GitHub Packages registry.

env:
NODE_VERSION: 18
Expand Down Expand Up @@ -95,10 +94,11 @@ jobs:
ref: ${{ github.event.inputs.branch }}

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci
Expand All @@ -107,31 +107,3 @@ jobs:
run: npm publish --provenance --tag ${{ needs.configure.outputs.vtag }} ${{ needs.configure.outputs.dry-run }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-gh:
needs:
- configure
- publish-npm # Don't publish to GitHub Packages until publishing to NPM is successfully completed

name: Publish to GitHub Packages
runs-on: ubuntu-latest
environment: release

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://npm.pkg.github.com'
cache: npm

- name: Install dependencies
run: npm ci

- name: Publish release to GitHub Packages
run: npm publish --provenance --tag ${{ needs.configure.outputs.vtag }} ${{ needs.configure.outputs.dry-run }}
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- synchronize
push:
branches:
- master
- main
- beta
schedule:
- cron: '30 0 1,15 * *'
Expand All @@ -18,7 +18,7 @@ permissions:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
authorize:
Expand Down
Loading

0 comments on commit 5bbf80d

Please sign in to comment.