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

Speed up ci #383

Merged
merged 156 commits into from
Dec 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
81f8980
Super broken commit of my throwing my brain at refactoring the Docker…
freeqaz Nov 25, 2021
8f5fcc6
responsive mostly WIP
factoidforrest Nov 30, 2021
0259e3e
began migrating to muiv5
factoidforrest Nov 30, 2021
9633d87
updated to MUI 5, finished first responsive pass
factoidforrest Nov 30, 2021
a2e4db0
cleanup
factoidforrest Nov 30, 2021
f8bcd13
merge master
factoidforrest Nov 30, 2021
200ab3f
fix integration tests
factoidforrest Dec 1, 2021
53ce6db
quieter cypress
factoidforrest Dec 1, 2021
53b957c
Merge branch 'master' into cli-docker-config-refactor
freeqaz Dec 1, 2021
9b7c2a6
add seo stuff
factoidforrest Dec 1, 2021
61cc9c4
Refactor CLI to be more modular
freeqaz Dec 1, 2021
4ece251
Merge remote-tracking branch 'origin/master' into responsive-demo-app
factoidforrest Dec 1, 2021
8ccfe40
got rid of unnecessary cypress step
factoidforrest Dec 2, 2021
46ddb91
extend cypress first page load timeout
factoidforrest Dec 2, 2021
6513898
try to catch cy bug
factoidforrest Dec 2, 2021
a72abf9
mode in header'
factoidforrest Dec 2, 2021
ee8297d
Switch to Yarn 2 and fix CLI Env bugs
freeqaz Dec 2, 2021
c098779
Update Yarn in gitignore
freeqaz Dec 2, 2021
ca0d2d2
Don't ignore nested yarn.lock files
freeqaz Dec 2, 2021
55b1239
fix bugs that were related to the demo app running after migration to…
breadchris Dec 2, 2021
1d5f5ee
Fix bugs introduced, also compile static assets in local mode now
freeqaz Dec 2, 2021
435a624
Remove Lerna from CI scripts
freeqaz Dec 2, 2021
51c4fab
Attempt to fix CI again
freeqaz Dec 2, 2021
95c8458
Add missing build scripts
freeqaz Dec 3, 2021
de69361
Add more type imports everywhere
freeqaz Dec 3, 2021
850a635
Cleanup versions and update Cypress
freeqaz Dec 3, 2021
e6ced9e
Docs are still broken, but it is at least closer now!
freeqaz Dec 3, 2021
bcd95d0
more permissive visit call
factoidforrest Dec 3, 2021
bdf3153
merge master
factoidforrest Dec 3, 2021
913764a
fix local scripts
factoidforrest Dec 3, 2021
77f35ff
Fix ESLint configuration in IntelliJ
freeqaz Dec 3, 2021
24e8371
change urls to make sure that demo and tests are working. use xfvb-run
breadchris Dec 3, 2021
8779381
Merge branch 'speed-up-ci' of github.com:lunasec-io/lunasec into spee…
breadchris Dec 3, 2021
5c4e36e
Merge branch 'master' into cli-docker-config-refactor
breadchris Dec 3, 2021
2e076d2
fix docs by preventing hoisting of docs deps
factoidforrest Dec 4, 2021
973b487
Merge branch 'cli-docker-config-refactor' into speed-up-ci
breadchris Dec 4, 2021
deb063f
Merge branch 'speed-up-ci' of github.com:refinery-labs/lunasec-monore…
factoidforrest Dec 4, 2021
799b7a5
Merge branch 'speed-up-ci' of github.com:refinery-labs/lunasec-monore…
factoidforrest Dec 4, 2021
55d88b0
make lockfile deletion in CI also regenerate
factoidforrest Dec 4, 2021
5eda9c4
yarn install during no lockfile test
breadchris Dec 4, 2021
75410c9
trick yarn install about ci mode
factoidforrest Dec 4, 2021
8b489c8
Merge branch 'speed-up-ci' of github.com:refinery-labs/lunasec-monore…
factoidforrest Dec 4, 2021
22053bc
remove extra yarn install
breadchris Dec 4, 2021
9e5b7fd
update lockfile
factoidforrest Dec 4, 2021
2b5ac00
lockfile hacks
factoidforrest Dec 4, 2021
5e0735a
try CI=false
factoidforrest Dec 4, 2021
e32ef1c
set ci blank
factoidforrest Dec 4, 2021
2850b6e
turn off fancy lockfile stuff
factoidforrest Dec 4, 2021
efa098a
remove go tests
breadchris Dec 4, 2021
0d7598b
ignore linting
breadchris Dec 4, 2021
48fd17d
cypress try global listener
factoidforrest Dec 6, 2021
1af96b1
restore tmuxp and sign up for cypress dashboard
factoidforrest Dec 6, 2021
a96980d
reintroduced initial visit call to try to make cy tests work in CI
factoidforrest Dec 6, 2021
b769635
more cypress headers
factoidforrest Dec 6, 2021
72e7175
get simple tokenizer working and restore go tests
factoidforrest Dec 7, 2021
36529c7
create a new workflow for checking evil deps
factoidforrest Dec 7, 2021
0977e29
simplify deps job
factoidforrest Dec 7, 2021
16790dd
simplify the RIGHT job
factoidforrest Dec 7, 2021
f312901
simplify CI env var
factoidforrest Dec 7, 2021
4012fb4
make sure buildkit is on inside cli container
factoidforrest Dec 7, 2021
afc728f
rewrite analytics inserter to support demo app
factoidforrest Dec 7, 2021
aeca6a2
make lint work again, update a ton of lint deps
factoidforrest Dec 7, 2021
3276ac2
attempt to prevent lerna-bootstrap double run
factoidforrest Dec 7, 2021
1649d69
added some eslint ignores
factoidforrest Dec 7, 2021
812fdc1
got all lints passing, definitely took on some tech-debt here
factoidforrest Dec 7, 2021
632ea64
improve bucket script
factoidforrest Dec 7, 2021
1bb29dc
fix lint
factoidforrest Dec 7, 2021
c4563e0
fix lint bug with react-scripts and hopefully fix aws_resources path bug
factoidforrest Dec 7, 2021
71364a3
Merge branch 'speed-up-ci' of github.com:lunasec-io/lunasec into spee…
freeqaz Dec 7, 2021
eb98f58
Merge branch 'speed-up-ci' of github.com:lunasec-io/lunasec into spee…
freeqaz Dec 7, 2021
3375f6f
Another pass of the CI
freeqaz Dec 8, 2021
506d6ac
Move Golang tests into their own job
freeqaz Dec 8, 2021
01812b9
Fix lint errors
freeqaz Dec 8, 2021
59b2cd8
free changes made
factoidforrest Dec 8, 2021
3a79206
fix cypress verbose logging env var
factoidforrest Dec 8, 2021
af4fb91
Split up the CI job into re-usable actions
freeqaz Dec 8, 2021
c44fe9b
Rename jobs
freeqaz Dec 8, 2021
fd762f8
Fix what is likely a bad path
freeqaz Dec 8, 2021
caa193f
Fix what is likely a bad path
freeqaz Dec 8, 2021
148c742
Remove action to test where bad syntax is
freeqaz Dec 8, 2021
c08cb1b
Test if variable syntax is the problem
freeqaz Dec 8, 2021
f687d77
Fix variable syntax
freeqaz Dec 8, 2021
d504b28
Test uses syntax with version
freeqaz Dec 8, 2021
1b9dcc4
Another round of checks
freeqaz Dec 8, 2021
46ea119
Another pass of tweaking
freeqaz Dec 8, 2021
6b8beea
Use underscores instead of dashes
freeqaz Dec 8, 2021
ae6e2c6
Fix invalid YAML
freeqaz Dec 8, 2021
4ac1a64
Move actions around
freeqaz Dec 8, 2021
a8909a7
No nested actions
freeqaz Dec 8, 2021
3dc03ce
Make input required
freeqaz Dec 8, 2021
7e6aea0
Minimum test
freeqaz Dec 8, 2021
080f09d
rename job
freeqaz Dec 8, 2021
e9b1c20
Rename job
freeqaz Dec 8, 2021
dfffb7a
id -> name
freeqaz Dec 8, 2021
aa343b1
id -> name
freeqaz Dec 8, 2021
7d52f95
Check variable syntax
freeqaz Dec 8, 2021
c1e1ac8
Double equals perhaps?
freeqaz Dec 8, 2021
d475554
Try with actual GitHub action script now
freeqaz Dec 8, 2021
e83371f
Pass event through
freeqaz Dec 8, 2021
1086dcd
Remove cancel step
freeqaz Dec 8, 2021
0dc13a0
Move steps back. maybe
freeqaz Dec 8, 2021
65e4b3e
Move steps back. maybe
freeqaz Dec 8, 2021
fcc4309
Only call second script now
freeqaz Dec 8, 2021
863d9ca
Inline second workflow
freeqaz Dec 8, 2021
275ea7f
Pass through a shell
freeqaz Dec 8, 2021
6c01f16
Inline at the end
freeqaz Dec 8, 2021
327abe6
Try inline again
freeqaz Dec 8, 2021
3bac30f
Bring back script
freeqaz Dec 8, 2021
6ad3bb6
Another test
freeqaz Dec 8, 2021
3909069
Just test merge branch check
freeqaz Dec 8, 2021
9bc790c
Test with an echo
freeqaz Dec 8, 2021
eae81fd
Test with a basic echo
freeqaz Dec 8, 2021
5fce658
Remove conditional
freeqaz Dec 8, 2021
4874594
Smush everything together
freeqaz Dec 8, 2021
4b7a3ce
Remove echo line
freeqaz Dec 8, 2021
5cfe965
Remove conditional
freeqaz Dec 8, 2021
afdc48d
made cypress dashboard more smarter
factoidforrest Dec 8, 2021
6651abf
Merge remote-tracking branch 'origin/master' into responsive-demo-app
factoidforrest Dec 8, 2021
a71de21
Remove all conditional logic by splitting up action
freeqaz Dec 9, 2021
3cfcd88
Remove Yarn cache
freeqaz Dec 9, 2021
7909536
Cleanup
freeqaz Dec 9, 2021
c9fcf88
Merge pull request #252 from lunasec-io/split-ci-job-up
freeqaz Dec 9, 2021
bb21e87
Merge branch 'master' into speed-up-ci
freeqaz Dec 10, 2021
927bb3b
update docusaurus to fix blogs and fix the awful looking admonition f…
factoidforrest Dec 10, 2021
5f7111e
make demo backend use pm2
factoidforrest Dec 10, 2021
323480a
Merge branch 'master' into speed-up-ci
freeqaz Dec 10, 2021
01ef349
Merge branch 'demo-crash' into speed-up-ci
freeqaz Dec 10, 2021
d474df1
update yarn.lock
factoidforrest Dec 10, 2021
4229b4e
Regenerate lockfile, fix CLI arguments for hosted demo
freeqaz Dec 11, 2021
2f4905d
Merge branch 'speed-up-ci' of github.com:lunasec-io/lunasec into spee…
freeqaz Dec 11, 2021
34b96ad
Disable Nginx volume
freeqaz Dec 11, 2021
c0aca7a
Fix a yarn error
freeqaz Dec 11, 2021
2935d75
Fix yarn.lock
freeqaz Dec 11, 2021
c9bacdb
Remove extraneous workdir statement
freeqaz Dec 11, 2021
b00d689
Uncomment nginx
freeqaz Dec 11, 2021
5498b90
Remove second build step from demo back end build
freeqaz Dec 11, 2021
4059892
Revert build change
freeqaz Dec 11, 2021
40e264f
no fork pm2
freeqaz Dec 11, 2021
035c46a
switch to pm2-runtime
factoidforrest Dec 11, 2021
719bd0f
merge HEAD
factoidforrest Dec 11, 2021
1518fbd
merge response demo app into this monster PR
factoidforrest Dec 14, 2021
2ccd979
add mui types
factoidforrest Dec 14, 2021
bdebffe
verbose start in CI
factoidforrest Dec 14, 2021
961d75f
yarn install
factoidforrest Dec 14, 2021
8e47582
made bucket script wait for file and brought back the use of a precac…
factoidforrest Dec 14, 2021
942553e
switch cli workdir to repo
factoidforrest Dec 14, 2021
16ada4d
try again in CI
factoidforrest Dec 15, 2021
775de50
increase max mocked s3 body size in nginx for live demo
factoidforrest Dec 15, 2021
f368e04
fix nginx args
factoidforrest Dec 15, 2021
f427c34
fix admonitions
factoidforrest Dec 21, 2021
8fa481a
merge master
factoidforrest Dec 21, 2021
46b9388
yarn stuff
factoidforrest Dec 21, 2021
a78329f
include more install steps in the precache
factoidforrest Dec 21, 2021
d055e9d
stop demo back end from starting prematurely
factoidforrest Dec 21, 2021
5a5a015
delete &&, it wasnt needed
factoidforrest Dec 21, 2021
14ae110
rename integration test workflow to just test
factoidforrest Dec 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 1 addition & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
.idea/
.github/

docs/

docker-compose.yaml
docker-compose.*.yaml

Expand All @@ -12,4 +10,4 @@ outputs/
**/build/
**/node_modules/
node_modules/
.npmrc
.npmrc
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{js,json,yml}]
charset = utf-8
indent_style = space
indent_size = 2
7 changes: 6 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@
**/build
**/generated
js/demo-apps/packages/react-front-end/cypress/integration/secure_components_spec.ts
**/ContactForm.jsx
.pnp.cjs
*.mjs
deploy-apigateway-to-firehose.ts
**/*.vue
**/metrics-server-backend/*
**/ContactForm.jsx
14 changes: 8 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ module.exports = {
node: true
},
extends: [
"plugin:vue/vue3-essential",
"@vue/typescript/recommended",
"@vue/prettier",
"@vue/prettier/@typescript-eslint",
// "plugin:vue/vue3-essential",
// "@vue/typescript/recommended",
// "@vue/prettier",
// "@vue/prettier/@typescript-eslint",
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
Expand Down Expand Up @@ -54,10 +54,12 @@ module.exports = {
},
plugins: [
'react',
'@typescript-eslint'
'@typescript-eslint',
'jest'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
"@typescript-eslint/no-unsafe-argument": 1, // TODO: Re-enable this rule and fix all errors
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', // These never error, currently
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
eqeqeq: 'error',
quotes: ['error', 'single', { allowTemplateLiterals: true, avoidEscape: true }],
Expand Down
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
<!--
~ Copyright by LunaSec (owned by Refinery Labs, Inc)
~
~ Licensed under the Creative Commons Attribution-ShareAlike 4.0 International
~ (the "License"); you may not use this file except in compliance with the
~ License. You may obtain a copy of the License at
~
~ https://creativecommons.org/licenses/by-sa/4.0/legalcode
~
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
---
name: Bug report
about: Create a report to help us improve
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/check-deps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check Dependencies

# This workflow checks to make sure that all dependency binaries are valid, to prevent a sneaky commit doing something malicious
on:
pull_request:
branches: ['**', '**']
push:
branches: [master]

jobs:
check-deps:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'

- name: dependencies
env:
IS_LUNASEC_CI: true
run: yarn install --immutable --immutable-cache --check-cache --inline-builds
22 changes: 22 additions & 0 deletions .github/workflows/composite/merge-branch/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Merge Master Branch'
description: 'Merges the master Git branch into the current branch.'

runs:
using: "composite"
steps:
# TODO: there may be a more idiomatic way to do this
- name: Check if we should skip this build
shell: bash
id: job-canceller
run: echo "::set-output name=cancelled::${{ github.event_name != 'pull_request' }}"

# Cancel the merge copy of this build(see the matrix above) if we are not in a PR
- name: cancelling
uses: andymckay/cancel-action@0.2
if: ${{ steps.job-canceller.outputs.cancelled == 'true' }}

# Merge with master (or whatever target branch) so we are actually testing what will happen after PR merges, not just this branch
- name: Merge target branch
shell: bash
run: git merge origin/${{ github.event.pull_request.base.ref }}
if: ${{ github.event_name == 'pull_request' }}
40 changes: 40 additions & 0 deletions .github/workflows/composite/setup-docker-ci/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 'Setup Docker CI Environment'
description: 'Creates the LunaSec CI build environment'

inputs:
merge_master:
description: 'If true, this merges the master branch during setup.'
required: true

runs:
using: "composite"
steps:
- name: Set up Docker BuildKit
id: buildx
uses: docker/setup-buildx-action@v1
with:
install: true # sets buildx as the default for docker, which should apply to docker-compose commands
driver: docker

- uses: actions/setup-node@v2
with:
node-version: '16'

# specifically tag this bootstrap container to prevent rebuilds
- name: Build Lerna Bootstrap container
shell: bash
env:
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
run: docker build --progress plain -f ./js/docker/demo.dockerfile -t lerna-bootstrap --target lerna-bootstrap .

- name: Build CLI Container
shell: bash
env:
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
run: docker build --progress plain -f ./js/docker/demo.dockerfile -t repo_lunasec-cli --target lunasec-cli .
14 changes: 4 additions & 10 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,13 @@ jobs:
with:
node-version: '16'

# Speed up builds by caching node_modules
- uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Lerna Bootstrap and Build Deploy Tool
env:
IS_LUNASEC_CI: true
CI: true
run: |
npx lerna bootstrap --ci
yarn install --immutable --immutable-cache --inline-builds
yarn compile:dev:infrastructure
npx lerna link

- name: Build Repo
working-directory: js/sdks
Expand Down
102 changes: 50 additions & 52 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# This is a basic workflow to help you get started with Actions

name: CI
name: Tests

# Controls when the workflow will run
on:
Expand All @@ -36,53 +36,27 @@ jobs:
env:
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
RUNNING_IN_CI: true
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
strategy:
matrix:
merge: ["merged", "not-merged"]
lockfile: ["lockfile","no-lockfile"]
lockfile: ["lockfile"] #,"no-lockfile"]
exclude:
- merge: "merged"
lockfile: "no-lockfile"

steps:

- uses: actions/checkout@v2
with:
fetch-depth: 0

#TODO: there may be a more idiomatic way to do this
- name: Check if we should skip this build
id: job-canceller
run: echo "::set-output name=cancelled::${{ matrix.merge == 'merged' && github.event_name != 'pull_request'}}"

# Cancel the merge copy of this build(see the matrix above) if we are not in a PR
- name: cancelling
uses: andymckay/cancel-action@0.2
if: ${{ steps.job-canceller.outputs.cancelled == 'true' }}

# merge with master(or whatever target branch) so we are actually testing what will happen after PR merges, not just this branch
- name: Merge target branch
run: git merge origin/${{ github.event.pull_request.base.ref }}
if: ${{ matrix.merge == 'merged' && github.event_name == 'pull_request' }}

- uses: actions/setup-node@v2
with:
node-version: '14'
cache: yarn

- uses: actions/setup-go@v2
with:
go-version: '^1.17.1'
- name: Setup Branch
uses: ./.github/workflows/composite/merge-branch
if: ${{ matrix.merge == 'merged' }}

- name: Set up Docker BuildKit
id: buildx
uses: docker/setup-buildx-action@v1
with:
install: true # sets buildx as the default for docker, which should apply to docker-compose commands
driver: docker
- name: Setup Environment
uses: ./.github/workflows/composite/setup-docker-ci

# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Setup tmate session
Expand All @@ -92,9 +66,13 @@ jobs:
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled != 'false' }}
timeout-minutes: 15

- name: Delete Lockfile
if: ${{ matrix.lockfile == 'no-lockfile' }}
run: rm yarn.lock
- uses: actions/setup-node@v2
with:
node-version: '16'

# - name: Delete and Regenerate Lockfile
# if: ${{ matrix.lockfile == 'no-lockfile' }}
# run: rm yarn.lock && CI="" yarn install #currently broken

# - uses: actions/setup-go@v2
# with:
Expand All @@ -116,22 +94,8 @@ jobs:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: npm run license:check

# TODO: move this into docker, using the same container that the dedicated tokenizer uses
- name: Go Tests
run: yarn run test:unit:go

- name: Build CLI Container
run: docker build --progress plain -f ./js/docker/demo.dockerfile -t repo_lunasec-cli --target lunasec-cli .

# Hijack the cli image to quickly run linting and unit testing
- name: Lint
run: docker run --entrypoint yarn repo_lunasec-cli lint

- name: Unit Test
run: docker run --entrypoint yarn repo_lunasec-cli test:unit:js

- name: Use CLI Container with docker.sock mounted to launch all other containers
run: docker run -v /var/run/docker.sock:/var/run/docker.sock -e HOST_MACHINE_PWD=$(pwd) repo_lunasec-cli start --no-sudo --local-build --env=tests
run: docker run -v /var/run/docker.sock:/var/run/docker.sock -e HOST_MACHINE_PWD=$(pwd) repo_lunasec-cli start --no-sudo --local-build --env=tests --verbose

- name: docker logs
if: ${{ always() && steps.job-canceller.outputs.cancelled == 'false' }}
Expand All @@ -158,4 +122,38 @@ jobs:
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_TITLE: PR Build ${{ github.head_ref }} ${{ job.status }}
SLACK_COLOR: ${{ job.status }}
SLACK_COLOR: ${{ job.status }}

golang-unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
merge: [ "merged", "not-merged" ]
lockfile: [ "lockfile" ] #,"no-lockfile"]
exclude:
- merge: "merged"
lockfile: "no-lockfile"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Branch
uses: ./.github/workflows/composite/merge-branch
if: ${{ matrix.merge == 'merged' }}

- uses: actions/setup-go@v2
with:
go-version: '^1.17.1'

# TODO: move this into docker, using the same container that the dedicated tokenizer uses
- name: Go Tests
run: yarn run test:unit:go

- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
if: ${{ steps.job-canceller.outputs.cancelled == 'false' }}
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_TITLE: PR Build ${{ github.head_ref }} ${{ job.status }}
SLACK_COLOR: ${{ job.status }}
28 changes: 28 additions & 0 deletions .github/workflows/lint-code.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint Code plus JS Unit Tests

# This workflow checks to make sure that all dependency binaries are valid, to prevent a sneaky commit doing something malicious
on:
pull_request:
branches: ['**', '**']
push:
branches: [master]

jobs:
lint-code:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Environment
uses: ./.github/workflows/composite/setup-docker-ci

# Use the bootstrap image to quickly run linting and unit testing
- name: Lint
run: docker run --entrypoint yarn lerna-bootstrap lint

- name: Unit Test
run: docker run --entrypoint yarn lerna-bootstrap test:unit:js

7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ jobs:
- name: install lerna
run: npm i -g lerna

- name: lerna bootstrap
- name: dependencies
env:
IS_LUNASEC_CI: true
run: lerna bootstrap --ci -- --frozen-lockfile
CI: true
run: yarn install --immutable --immutable-cache --check-cache --inline-builds

- name: Configure CI Git User
run: |
Expand Down Expand Up @@ -132,4 +133,4 @@ jobs:
- name: git push new tags
run: git push --tags
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading