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

chore: Migrate from Drone CI to GitHub Actions #862

Merged
merged 14 commits into from
Jan 20, 2025
Merged
10 changes: 0 additions & 10 deletions .drone/README.md

This file was deleted.

148 changes: 0 additions & 148 deletions .drone/drone.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -17,3 +17,18 @@ updates:
ignore:
- dependency-name: 'ua-parser-js'
versions: ['2.x']
- package-ecosystem: 'docker'
directory: '/'
schedule:
interval: 'daily'
commit-message:
prefix: 'chore'
include: 'scope'
# github actions
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
commit-message:
prefix: 'chore'
include: 'scope'
81 changes: 81 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Pull Request

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/jod'
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: Lint
run: yarn quality:lint

- name: Check circular dependencies
run: yarn quality:circular-deps

- name: Unit tests
run: yarn quality:test

e2e:
runs-on: ubuntu-latest
container: node:20-bookworm-slim

services:
database:
image: postgres:latest
env:
POSTGRES_DB: demo
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/iron'
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: E2E tests
uses: cypress-io/github-action@v6
env:
DATABASE_HOST: database
DATABASE_PORT: 5432
DATABASE_NAME: demo
DATABASE_USER: postgres
DATABASE_PASSWORD: postgres
IS_TEST: 1
with:
command: yarn quality:e2e:ci
install: false
112 changes: 112 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Release

on:
push:
tags:
- '*'

jobs:
test:
runs-on: ubuntu-latest

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: Lint
run: yarn quality:lint

- name: Check circular dependencies
run: yarn quality:circular-deps

- name: Unit tests
run: yarn quality:test

e2e:
runs-on: ubuntu-latest
container: node:20-bookworm-slim
needs: test

services:
database:
image: postgres:latest
env:
POSTGRES_DB: demo
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/iron'
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: E2E tests
uses: cypress-io/github-action@v6
env:
DATABASE_HOST: database
DATABASE_PORT: 5432
DATABASE_NAME: demo
DATABASE_USER: postgres
DATABASE_PASSWORD: postgres
IS_TEST: 1
with:
command: yarn quality:e2e:ci
install: false

publish:
runs-on: ubuntu-latest
needs: [test, e2e]

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/iron'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: Publish
run: yarn run publish from-git --yes --no-verify-access
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-alpine
FROM node:20-alpine

ARG DEMO_DEMO_PATH
ARG DEMO_PACKAGES_CORE_PATH
2 changes: 1 addition & 1 deletion demo/src/client/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { StrictMode } from 'react';
import SSRProvider from 'react-bootstrap/SSRProvider';
import { SSRProvider } from 'react-bootstrap';
import { hydrateRoot } from 'react-dom/client';
import { HelmetProvider } from 'react-helmet-async';
import { Provider as ReduxProvider } from 'react-redux';
2 changes: 1 addition & 1 deletion demo/src/server/routes/render/renderToString.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { StrictMode } from 'react';
import SSRProvider from 'react-bootstrap/SSRProvider';
import { SSRProvider } from 'react-bootstrap';
import { renderToString as reactRenderToString } from 'react-dom/server';
import { HelmetProvider } from 'react-helmet-async';
import type { FilledContext } from 'react-helmet-async';