mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 13:43:09 +00:00
95ac919ddf
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v2...v3) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
90 lines
2.8 KiB
YAML
90 lines
2.8 KiB
YAML
name: 'e2e-couchdb'
|
|
on:
|
|
push:
|
|
branches: master
|
|
workflow_dispatch:
|
|
pull_request:
|
|
types:
|
|
- labeled
|
|
- opened
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
jobs:
|
|
e2e-couchdb:
|
|
if: contains(github.event.pull_request.labels.*.name, 'pr:e2e:couchdb') || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event.action == 'opened'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 'lts/hydrogen'
|
|
|
|
- name: Cache NPM dependencies
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-
|
|
|
|
- run: npm install --cache ~/.npm --no-audit --progress=false
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v3
|
|
continue-on-error: true
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- run: npx playwright@1.36.2 install
|
|
|
|
- name: Start CouchDB Docker Container and Init with Setup Scripts
|
|
run: |
|
|
export $(cat src/plugins/persistence/couch/.env.ci | xargs)
|
|
docker-compose -f src/plugins/persistence/couch/couchdb-compose.yaml up --detach
|
|
sleep 3
|
|
bash src/plugins/persistence/couch/setup-couchdb.sh
|
|
bash src/plugins/persistence/couch/replace-localstorage-with-couchdb-indexhtml.sh
|
|
|
|
- name: Run CouchDB Tests and publish to deploysentinel
|
|
env:
|
|
DEPLOYSENTINEL_API_KEY: ${{ secrets.DEPLOYSENTINEL_API_KEY }}
|
|
COMMIT_INFO_SHA: ${{github.event.pull_request.head.sha }}
|
|
run: npm run test:e2e:couchdb
|
|
|
|
- name: Publish Results to Codecov.io
|
|
env:
|
|
SUPER_SECRET: ${{ secrets.CODECOV_TOKEN }}
|
|
run: npm run cov:e2e:full:publish
|
|
|
|
- name: Archive test results
|
|
if: success() || failure()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
path: test-results
|
|
|
|
- name: Archive html test results
|
|
if: success() || failure()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
path: html-test-results
|
|
|
|
- name: Remove pr:e2e:couchdb label (if present)
|
|
if: always()
|
|
uses: actions/github-script@v6
|
|
with:
|
|
script: |
|
|
const { owner, repo, number } = context.issue;
|
|
const labelToRemove = 'pr:e2e:couchdb';
|
|
try {
|
|
await github.rest.issues.removeLabel({
|
|
owner,
|
|
repo,
|
|
issue_number: number,
|
|
name: labelToRemove
|
|
});
|
|
} catch (error) {
|
|
core.warning(`Failed to remove ' + labelToRemove + ' label: ${error.message}`);
|
|
}
|