Skip to content

Commit

Permalink
Merge pull request #16 from nyaruka/main
Browse files Browse the repository at this point in the history
Update repo
  • Loading branch information
teehamaral authored Jun 7, 2024
2 parents 0b0e634 + 4309721 commit cd41416
Show file tree
Hide file tree
Showing 1,731 changed files with 25,370 additions and 17,518 deletions.
14 changes: 14 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye"

RUN apt-get update \
&& apt-get install chromium fonts-noto-color-emoji -y --no-install-recommends -qq

# The rest of our environment
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
ENV CHROME_PATH=/usr/bin/chromium
ENV DEBIAN_FRONTEND=noninteractive

WORKDIR /workspaces/temba-components
RUN yarn install
USER node
31 changes: 31 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "temba-components",
"build": {
"dockerfile": "Dockerfile"
},
"features": {},
"forwardPorts": [
3010
],
"runArgs": [
"--name=dev-components",
"--network=textit_default",
"--hostname=temba-components"
],
"remoteUser": "node",
"postCreateCommand": "sudo chown -R node /workspaces/temba-components/static/svg && sudo chown node /workspaces/temba-components && sudo chown node /workspaces/temba-components/screenshots && yarn install",
"customizations": {
"vscode": {
"extensions": [
"lfs.vscode-emacs-friendly"
],
"settings": {
"terminal.integrated.defaultProfile.linux": "zsh",
"editor.formatOnSave": true,
"editor.rulers": [
120
]
}
}
}
}
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
8 changes: 3 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/warnings'
],
rules: {
// disable the rule for all files
Expand All @@ -16,9 +16,7 @@ module.exports = {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: '_' }],
'import/named': 'off',
'import/no-unresolved': 'off',
'import/extensions': ['error', 'never', { test: 'always' }],
},
'import/no-unresolved': 'off'
}
};
38 changes: 22 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
name: Build
name: 'build'

on: [push]

jobs:
bulid:
runs-on: macOS-11
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
- name: Set Timezone
uses: szenius/[email protected]
with:
node-version: 12
- name: Screenshot Tests
run: |
yarn install
yarn test
env:
CI: true
- uses: actions/upload-artifact@v2
timezoneLinux: "UTC"
- name: Checkout (GitHub)
uses: actions/checkout@v4
- run: docker network create --driver bridge textit_default
- name: Build and run dev container task
uses: devcontainers/[email protected]
with:
runCmd: yarn test
push: never
env: |
CI=true
- name: Upload artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: screenshots
path: screenshots/

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.0.4
uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}}
file: coverage/lcov.info
files: coverage/lcov.info
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
PERSONAL_ACCESS_TOKEN : ${{ secrets.CLA_TOKEN }}
with:
path-to-signatures: 'signatures/version1/cla.json'
path-to-document: 'https://github.com/nyaruka/legal/blob/main/TextIt%20CLA.md'
path-to-document: 'https://github.com/nyaruka/license/blob/main/TextIt_CLA.md'
branch: 'main'
allowlist: bot*
remote-organization-name: 'nyaruka'
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
- name: Checkout (GitHub)
uses: actions/checkout@v4
- run: docker network create --driver bridge textit_default
- name: Build and run dev container task
uses: devcontainers/[email protected]
with:
node-version: 12
- name: Build and Test
run: |
yarn install
yarn run build
env:
CI: true
runCmd: yarn run build
push: never
env: |
CI=true
- name: Publish
run: |
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
# For more information, see: https://github.com/actions/stale
name: Close stale issues and PRs
on:
schedule:
- cron: "30 1 * * *"
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-label: "inactive"
stale-issue-message: "Without activity, this issue will be closed in 14 days."
close-issue-message: "This issue was closed for inactivity."
stale-pr-message: "Without activity, this PR will be closed in 14 days."
close-pr-message: "This PR was closed for inactivity."
stale-pr-label: "inactive"
days-before-pr-stale: 30
days-before-pr-close: 14
days-before-issue-stale: 30
days-before-issue-close: 14
exempt-all-assignees: true
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@
.yarn/cache/
.yarn/install-state.gz
.yarn/versions

# svg working directory
/static/svg/work/

# dont check in diffs
/screenshots/diff/
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": true,
"trailingComma": "none",
"singleQuote": true,
"printWidth": 80
}
6 changes: 3 additions & 3 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ module.exports = {
addons: [
'storybook-prebuilt/addon-knobs/register.js',
'storybook-prebuilt/addon-docs/register.js',
'storybook-prebuilt/addon-viewport/register.js',
'storybook-prebuilt/addon-viewport/register.js'
],
esDevServer: {
// custom es-dev-server options
nodeResolve: true,
watch: true,
open: true,
},
open: true
}
};
4 changes: 2 additions & 2 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { addParameters, setCustomElements } from '@open-wc/demoing-storybook';

addParameters({
docs: {
iframeHeight: '200px',
},
iframeHeight: '200px'
}
});

async function run() {
Expand Down
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@


# yarn-path ".yarn/releases/yarn-1.22.10.cjs"
# --install.modules-folder "./linux/node_modules"
5 changes: 5 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
nodeLinker: node-modules
supportedArchitectures:
os:
- "current"
- "darwin"
- "linux"
Loading

0 comments on commit cd41416

Please sign in to comment.