added 260907 version of worker toolkit
This commit is contained in:
16
worker-toolkit-flaredown/repo/.github/dependabot.yml
vendored
Normal file
16
worker-toolkit-flaredown/repo/.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
|
||||
- package-ecosystem: "bundler"
|
||||
directory: "/backend"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/frontend"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
154
worker-toolkit-flaredown/repo/.github/workflows/backend.yml
vendored
Normal file
154
worker-toolkit-flaredown/repo/.github/workflows/backend.yml
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
name: backend
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
backend: ${{ steps.filter.outputs.backend }}
|
||||
frontend: ${{ steps.filter.outputs.frontend }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
backend:
|
||||
- 'backend/**'
|
||||
- '.github/workflows/**'
|
||||
frontend:
|
||||
- 'frontend/**'
|
||||
- '.github/workflows/**'
|
||||
|
||||
standardrb:
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.backend == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: backend
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
working-directory: backend
|
||||
bundler-cache: true
|
||||
|
||||
- name: Build & Run
|
||||
run: |
|
||||
bundle exec standardrb
|
||||
|
||||
erb-lint:
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.backend == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: backend
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true
|
||||
|
||||
- name: ERB lint
|
||||
run: |
|
||||
gem install erb_lint
|
||||
erblint --lint-all --autocorrect
|
||||
|
||||
rspec:
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.backend == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: backend
|
||||
env:
|
||||
MONGODB_HOST: localhost
|
||||
MONGODB_PORT: 27017
|
||||
POSTGRES_HOST: localhost
|
||||
DATABASE_HOST: localhost
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_HOST_AUTH_METHOD: trust
|
||||
POSTGRES_PORT: 5432
|
||||
INTERCOM_SECRET: secret
|
||||
BASE_URL: test.com
|
||||
|
||||
services:
|
||||
redis:
|
||||
image: redis:6.2.3-alpine
|
||||
ports: ["6379:6379"]
|
||||
options: --entrypoint redis-server
|
||||
|
||||
db:
|
||||
image: postgres:12.8-alpine
|
||||
env:
|
||||
POSTGRES_PASSWORD: password
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install PostgreSQL client
|
||||
run: |
|
||||
sudo apt-get -yqq install libpq-dev
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
working-directory: backend
|
||||
bundler-cache: true
|
||||
|
||||
- name: Start MongoDB
|
||||
uses: supercharge/mongodb-github-action@1.10.0
|
||||
with:
|
||||
mongodb-version: 4.4.9
|
||||
|
||||
- name: Load database schema
|
||||
run: |
|
||||
bundle exec rake db:create
|
||||
bundle exec rake db:schema:load
|
||||
|
||||
- name: Run rspec
|
||||
run: |
|
||||
bundle exec rspec
|
||||
|
||||
brakeman:
|
||||
name: Security Analysis
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
working-directory: backend
|
||||
bundler-cache: true
|
||||
- name: Brakeman
|
||||
uses: reviewdog/action-brakeman@v2
|
||||
with:
|
||||
brakeman_version: gemfile
|
||||
reporter: github-pr-review
|
||||
75
worker-toolkit-flaredown/repo/.github/workflows/frontend.yml
vendored
Normal file
75
worker-toolkit-flaredown/repo/.github/workflows/frontend.yml
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
name: frontend
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
backend: ${{ steps.filter.outputs.backend }}
|
||||
frontend: ${{ steps.filter.outputs.frontend }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
backend:
|
||||
- 'backend/**'
|
||||
- '.github/workflows/**'
|
||||
frontend:
|
||||
- 'frontend/**'
|
||||
- '.github/workflows/**'
|
||||
|
||||
test-app:
|
||||
name: Test app
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.frontend == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 7
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 14
|
||||
cache: npm
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
- uses: browser-actions/setup-chrome@v2
|
||||
id: setup-chrome
|
||||
- run: npm install -g npm@6.14.18
|
||||
- run: npm install
|
||||
working-directory: ./frontend
|
||||
- run: npm run test
|
||||
working-directory: ./frontend
|
||||
env:
|
||||
CHROME_BIN: ${{ steps.setup-chrome.outputs.chrome-path }}
|
||||
|
||||
node-next-test:
|
||||
strategy:
|
||||
matrix:
|
||||
node_version: ['16', '18', '20']
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.frontend == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 7
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
- uses: browser-actions/setup-chrome@v2
|
||||
id: setup-chrome
|
||||
- run: npm install
|
||||
working-directory: ./frontend
|
||||
- run: npm run test
|
||||
working-directory: ./frontend
|
||||
env:
|
||||
CHROME_BIN: ${{ steps.setup-chrome.outputs.chrome-path }}
|
||||
86
worker-toolkit-flaredown/repo/.github/workflows/native.yml
vendored
Normal file
86
worker-toolkit-flaredown/repo/.github/workflows/native.yml
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
name: native
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
backend: ${{ steps.filter.outputs.backend }}
|
||||
native: ${{ steps.filter.outputs.native }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
backend:
|
||||
- 'backend/**'
|
||||
- '.github/workflows/**'
|
||||
native:
|
||||
- 'native/**'
|
||||
- '.github/workflows/**'
|
||||
|
||||
test-app:
|
||||
name: Test app
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.native == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 7
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: npm
|
||||
cache-dependency-path: native/package-lock.json
|
||||
- run: npm ci
|
||||
working-directory: ./native
|
||||
- run: npm run test
|
||||
working-directory: ./native
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.native == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 7
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: npm
|
||||
cache-dependency-path: native/package-lock.json
|
||||
- run: npm ci
|
||||
working-directory: ./native
|
||||
- run: npm run lint
|
||||
working-directory: ./native
|
||||
|
||||
type-check:
|
||||
name: Type check
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.native == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 7
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: npm
|
||||
cache-dependency-path: native/package-lock.json
|
||||
- run: npm ci
|
||||
working-directory: ./native
|
||||
- run: npm run tsc
|
||||
working-directory: ./native
|
||||
|
||||
|
||||
Reference in New Issue
Block a user