fe4ba3360a
Moved NODE_USE_ENV_PROXY environment variable assignment from the GitHub Actions workflow to main.js for consistent runtime configuration. This change ensures the variable is always set when the application runs, regardless of workflow environment settings.
59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
name: test
|
||
|
||
on:
|
||
push:
|
||
branches:
|
||
- main
|
||
pull_request:
|
||
workflow_dispatch:
|
||
|
||
concurrency:
|
||
group: ${{ github.workflow }}-${{ github.ref }}
|
||
cancel-in-progress: true
|
||
|
||
permissions:
|
||
contents: read
|
||
|
||
jobs:
|
||
integration:
|
||
name: Integration
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- uses: actions/checkout@v5
|
||
|
||
- uses: actions/setup-node@v4
|
||
with:
|
||
node-version-file: package.json
|
||
cache: 'npm'
|
||
|
||
- run: npm ci
|
||
- run: npm test
|
||
|
||
end-to-end:
|
||
name: End-to-End
|
||
runs-on: ubuntu-latest
|
||
# do not run from forks, as forks don’t have access to repository secrets
|
||
if: github.event.pull_request.head.repo.owner.login == github.event.pull_request.base.repo.owner.login
|
||
steps:
|
||
- uses: actions/checkout@v5
|
||
- uses: actions/setup-node@v4
|
||
with:
|
||
node-version-file: package.json
|
||
cache: 'npm'
|
||
- run: npm ci
|
||
- run: npm run build
|
||
- uses: ./ # Uses the action in the root directory
|
||
id: test
|
||
env:
|
||
https_proxy: https://example.com
|
||
with:
|
||
app-id: ${{ vars.TEST_APP_ID }}
|
||
private-key: ${{ secrets.TEST_APP_PRIVATE_KEY }}
|
||
- uses: octokit/request-action@v2.x
|
||
id: get-repository
|
||
env:
|
||
GITHUB_TOKEN: ${{ steps.test.outputs.token }}
|
||
with:
|
||
route: GET /installation/repositories
|
||
- run: echo '${{ steps.get-repository.outputs.data }}'
|