Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ root = true

[*]
indent_style = space
indent_size = 2
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
Expand Down
61 changes: 13 additions & 48 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,31 @@ on:

env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
SLACK_BOT_TOKEN: ${{secrets.SLACK_BOT_TOKEN}}

permissions:
contents: read
pull-requests: read

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
notify_start:
runs-on: ubuntu-latest
# Ideally this condition would be promoted to a workflow-level environment variable and shared
# but this doesn't seem to be supported yet https://github.community/t/how-to-set-and-access-a-workflow-variable/17335/6
if: github.repository_owner == 'AndcultureCode'
steps:
- uses: voxmedia/github-action-slack-notify-build@v1
if: env.SLACK_BOT_TOKEN != ''
with:
channel: company-andculture-code-ci
color: "#3278BD"
status: STARTED
build:
runs-on: ${{matrix.os}}
needs: [notify_start]
if: always()
strategy:
matrix:
include:
- {
os: windows-latest,
node: 8.16.2,
node: 14.19.3,
allowed-to-fail: false,
}
- {
os: windows-latest,
node: 14.15.5,
node: 16.15.1,
allowed-to-fail: true,
}
continue-on-error: ${{matrix.allowed-to-fail}}
Expand All @@ -52,10 +47,8 @@ jobs:
node-version: ${{matrix.node}}

- name: npm install
# Using Cypress action for caching optimization (saves ~3mins of downloading Cypress every build)
uses: cypress-io/github-action@v2
with:
runTests: false
run: |
npm install

- name: Run build
run: |
Expand All @@ -65,33 +58,5 @@ jobs:
run: |
npm run coverage

- name: Cypress tests
run: |
npm run test-cypress

- name: Upload to codecov
uses: codecov/codecov-action@v1

notify_success:
runs-on: ubuntu-latest
needs: [build]
if: github.repository_owner == 'AndcultureCode' && success()
steps:
- uses: voxmedia/github-action-slack-notify-build@v1
if: env.SLACK_BOT_TOKEN != ''
with:
channel: company-andculture-code-ci
color: good
status: SUCCESS

notify_failure:
runs-on: ubuntu-latest
needs: [build]
if: github.repository_owner == 'AndcultureCode' && failure()
steps:
- uses: voxmedia/github-action-slack-notify-build@v1
if: env.SLACK_BOT_TOKEN != ''
with:
channel: company-andculture-code-ci
color: danger
status: FAILED
15 changes: 7 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,18 @@
"csharp.format.enable": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.rulers": [
100
],
"editor.rulers": [100],
"json.schemas": [
{
"fileMatch": [
"cypress.json"
],
"fileMatch": ["cypress.json"],
"url": "https://on.cypress.io/cypress.schema.json"
}
],
"prettier.requireConfig": true,
"trailing-spaces.trimOnSave": true,
"typescript.preferences.quoteStyle": "double",
"typescript.tsdk": "./node_modules/typescript/lib"
}
"typescript.tsdk": "./node_modules/typescript/lib",
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": "./.github/workflows/build.yaml"
}
}
12 changes: 12 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from 'cypress'

export default defineConfig({
video: false,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},
},
})
3 changes: 0 additions & 3 deletions cypress.json

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
globals: {
"ts-jest": {
diagnostics: false,
tsConfig: "<rootDir>/tsconfig.json",
tsconfig: "<rootDir>/tsconfig.json",
},
},
moduleDirectories: ["node_modules", "src"],
Expand Down
Loading