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

[CI]Add docker and npm caching #6748

Merged
merged 40 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c839fe1
Add docker and npm caching
unlikelyzero Jun 20, 2023
926095b
add caching to platform
unlikelyzero Jun 20, 2023
5fe76bb
use node_version
unlikelyzero Jun 20, 2023
e528fe0
bump to 18 and rearrange
unlikelyzero Jun 20, 2023
d0c5685
bump to 18 and include caching
unlikelyzero Jun 20, 2023
5675b56
bump to 18
unlikelyzero Jun 20, 2023
0d57808
use node_version
unlikelyzero Jun 20, 2023
6548137
closing bracket
unlikelyzero Jun 20, 2023
ea81cf3
update windows eol for prettier
unlikelyzero Jun 20, 2023
1cc355b
no lock
unlikelyzero Jun 20, 2023
2f08565
npm install with cache
unlikelyzero Jun 20, 2023
2d8dd76
no audit
unlikelyzero Jun 20, 2023
977bbca
fix broken dependabot triggers
unlikelyzero Jun 21, 2023
b408678
remove comments
unlikelyzero Jun 21, 2023
ad84d0d
two fixes
unlikelyzero Jun 21, 2023
8f1f7a9
Merge branch 'master' into caching-for-workflows
unlikelyzero Jun 21, 2023
7ce3903
remove comment and add timeout
unlikelyzero Jun 21, 2023
480a4be
Merge branch 'caching-for-workflows' of https://github.com/nasa/openm…
unlikelyzero Jun 21, 2023
c38026a
always remove and reference labelToRemove
unlikelyzero Jun 21, 2023
61568bc
Merge branch 'master' into caching-for-workflows
unlikelyzero Jun 21, 2023
529168b
Merge branch 'master' into caching-for-workflows
ozyx Jun 21, 2023
7cb2084
debug
ozyx Jun 21, 2023
0046d20
debug
ozyx Jun 21, 2023
6e07d7c
filter out some events
ozyx Jun 21, 2023
c684926
Revert "debug"
ozyx Jun 21, 2023
b9e4fbb
Revert "debug"
ozyx Jun 21, 2023
30c68de
Revert "filter out some events"
ozyx Jun 21, 2023
1f1a54f
remove dependabot actor check
ozyx Jun 21, 2023
63a8254
remove "opened" check in if statement
ozyx Jun 21, 2023
61362b6
moar debug
ozyx Jun 21, 2023
5f887fe
syntax
ozyx Jun 21, 2023
8062611
Revert "syntax"
ozyx Jun 21, 2023
2f6db6f
Revert "moar debug"
ozyx Jun 21, 2023
2b9b8ee
Revert "remove "opened" check in if statement"
ozyx Jun 21, 2023
baefa6a
Revert "remove dependabot actor check"
ozyx Jun 21, 2023
0ed4c8a
try removing `${{ }}`
ozyx Jun 21, 2023
78f30bd
more syntax
ozyx Jun 21, 2023
b6d6133
try wrapping in singular `${{ }}`
ozyx Jun 21, 2023
3bb7fdc
fix label names
ozyx Jun 21, 2023
cab322f
Merge branch 'master' into caching-for-workflows
ozyx Jun 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 24 additions & 2 deletions .github/workflows/e2e-couchdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,56 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 'lts/gallium'
- run: npx playwright@1.32.3 install
node-version: 'lts/hydrogen'

- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- run: npm install

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- run: npx playwright@1.32.3 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 }}
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: ${{ contains(github.event.pull_request.labels.*.name, 'pr:e2e:couchdb') }}
uses: actions/github-script@v6
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/e2e-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,16 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: 'lts/hydrogen'

- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- run: npx playwright@1.32.3 install
- run: npx playwright install chrome-beta
- run: npm install
Expand Down Expand Up @@ -82,4 +91,4 @@ jobs:
});
} catch (error) {
core.warning(`Failed to remove 'pr:e2e' label: ${error.message}`);
}
}
4 changes: 2 additions & 2 deletions .github/workflows/npm-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: lts/hydrogen
- run: npm install
- run: |
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
Expand All @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: lts/hydrogen
registry-url: https://registry.npmjs.org/
- run: npm install
- run: npm publish --access=public --tag unstable
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/pr-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- macos-latest
- windows-latest
node_version:
- 16
- 18
- lts/gallium
- lts/hydrogen
architecture:
- x64
name: Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }}
Expand All @@ -28,6 +28,15 @@ jobs:
with:
node-version: ${{ matrix.node_version }}
architecture: ${{ matrix.architecture }}

- name: Cache NPM dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node_version }}-

- run: npm install
- run: npm test
- run: npm run lint -- --quiet
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"trailingComma": "none",
"singleQuote": true,
"printWidth": 100
"printWidth": 100,
"endOfLine": "auto"
ozyx marked this conversation as resolved.
Show resolved Hide resolved
}