Skip to content

Commit

Permalink
Merge pull request #1 from pol-is/dev
Browse files Browse the repository at this point in the history
update dev fork
  • Loading branch information
crkrenn authored Jul 5, 2020
2 parents 2970fe0 + 54ac6b8 commit a7b4adb
Show file tree
Hide file tree
Showing 647 changed files with 117,413 additions and 185 deletions.
3 changes: 3 additions & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[log]
# Display full log history even with file moves.
follow = true
18 changes: 18 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This is used to auto-assign reviewers to pull requests, among other things.
#
# Note: Currently only works for users/teams with write access.
# See: https://help.github.com/en/github/creating-cloning-and-archiving-reposoitories/about-code-owners

* @pol-is/core @pol-is/community

/client-*/** @colinmegill

/.github/** @metasoarous
/server/** @metasoarous
/math/** @metasoarous

docker-compose.yml @metasoarous @patcon @ballpointpenguin
Dockerfile* @metasoarous @patcon @ballpointpenguin
*.env* @metasoarous @patcon @ballpointpenguin

/e2e/** @patcon @ballpointpenguin
103 changes: 103 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
version: 2
# Config Docs: https://help.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#about-the-dependabotyml-file

updates:
# JAVASCRIPT package.json updates

- directory: "/client-admin"
package-ecosystem: "npm"
labels: ["dependencies", "🔩 p:client-admin"]
target-branch: "dev"
schedule:
interval: "weekly"

- directory: "/file-server"
package-ecosystem: "npm"
labels: ["dependencies"]
target-branch: "dev"
schedule:
interval: "weekly"

## Disabled (until major manual update)

- directory: "/server"
package-ecosystem: "npm"
labels: ["dependencies", "🔩 p:server"]
target-branch: "dev"
schedule:
interval: "weekly"
ignore:
- dependency-name: "*"

- directory: "/client-participation"
package-ecosystem: "npm"
labels: ["dependencies", "🔩 p:client-participation"]
target-branch: "dev"
schedule:
interval: "weekly"
ignore:
- dependency-name: "*"

- directory: "/client-report"
package-ecosystem: "npm"
labels: ["dependencies", "🔩 p:client-report"]
target-branch: "dev"
schedule:
interval: "weekly"
ignore:
- dependency-name: "*"

# DOCKER image updates

- directory: "/math"
package-ecosystem: "docker"
labels: ["dependencies", "⚒️ infrastructure", "🔩 p:math"]
target-branch: "dev"
schedule:
interval: "weekly"

- directory: "/server"
package-ecosystem: "docker"
labels: ["dependencies", "⚒️ infrastructure", "🔩 p:server"]
target-branch: "dev"
schedule:
interval: "weekly"

- directory: "/file-server"
package-ecosystem: "docker"
labels: ["dependencies", "⚒️ infrastructure"]
target-branch: "dev"
schedule:
interval: "weekly"

- directory: "/client-admin"
package-ecosystem: "docker"
labels: ["dependencies", "⚒️ infrastructure", "🔩 p:client-admin"]
target-branch: "dev"
schedule:
interval: "weekly"

- directory: "/client-participation"
package-ecosystem: "docker"
labels: ["dependencies", "⚒️ infrastructure", "🔩 p:client-participation"]
target-branch: "dev"
schedule:
interval: "weekly"

- directory: "/client-report"
package-ecosystem: "docker"
labels: ["dependencies", "⚒️ infrastructure", "🔩 p:client-report"]
target-branch: "dev"
schedule:
interval: "weekly"

# GITHUB ACTIONS external action updates

# Workflow files stored in the
# default location of `.github/workflows`
- directory: "/"
package-ecosystem: "github-actions"
labels: ["dependencies", "⚒️ infrastructure"]
target-branch: "dev"
schedule:
interval: "daily"
34 changes: 34 additions & 0 deletions .github/workflows/build-nightlies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Changes to workflow name require changes to badge URL in README.md
name: Nightly Docker Builds

on:
schedule:
# Every night at 4am ET
- cron: '0 8 * * *'

jobs:
build:
runs-on: ubuntu-latest
env:
GHA_BRANCH: dev
# Use native docker command within docker-compose
COMPOSE_DOCKER_CLI_BUILD: 1
# Use buildkit to speed up docker command
DOCKER_BUILDKIT: 1
steps:
- name: Checkout
uses: actions/checkout@v2.3.1
with:
ref: ${{ env.GHA_BRANCH }}

- name: Login to Docker Hub
uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build full project via docker-compose
run: docker-compose build --parallel --build-arg GIT_HASH=${GITHUB_SHA:0:6}

- name: Push images to Docker Hub
run: docker-compose push --ignore-push-failures
68 changes: 68 additions & 0 deletions .github/workflows/bundlewatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: "Bundlewatch Github Action"

on:
push:
# Required so that baseline for comparison is pushed to bundlewatch service.
branches: ["dev"]
# Note: Only configured for client-admin right now.
paths:
- .github/workflows/bundlewatch.yml
- client-admin/**
pull_request:
types: ["opened", "reopened", "synchronize"]
paths:
- .github/workflows/bundlewatch.yml
- client-admin/**

jobs:
bundlewatch:
runs-on: ubuntu-latest
env:
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2.3.1

- name: Use Node.js
uses: actions/setup-node@v2.1.0
with:
node-version: 14.4.0

- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Restore npm cache directory
uses: actions/cache@v2.0.0
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Bundlewatch
run: npm install -g bundlewatch@0.2.6

- name: "Install & Build: client-admin"
working-directory: client-admin
run: |
npm install
npm run build:webpack
- name: Run Bundlewatch
# TODO: Move config to root directory, so easier to run against all components.
# See: https://github.com/bundlewatch/bundlewatch/pull/170
working-directory: client-admin
env:
CI_BRANCH_DEFAULT: ${{ github.event.repository.default_branch }}

PR_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
PR_BRANCH: ${{ github.event.pull_request.head.ref }}
# Overrides `ci.repoBranchBase` (bundlewatch config)
PR_BRANCH_BASE: ${{ github.event.pull_request.base.ref }}

PUSH_COMMIT_SHA: ${{ github.event.after }}
# PUSH_BRANCH: see below (needs processing)
PUSH_BRANCH_BASE: ${{ github.event.repository.default_branch }}
# GITHUB_REF is in format `refs/heads/branch-name`, so need to strip first part.
run: PUSH_BRANCH=${GITHUB_REF#refs/heads/} npx bundlewatch --config .bundlewatch.config.js
63 changes: 63 additions & 0 deletions .github/workflows/cypress-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Changes to workflow name require changes to badge URL in README.md
name: E2E Tests

on:
push:
branches:
- dev
paths-ignore:
- "**.md"

pull_request:
paths-ignore:
- "**.md"

jobs:
cypress-run:
# Platform recommended in cypress-io/github-action docs.
runs-on: ubuntu-16.04
# Manually skip this 10+ minute build based on commit message.
if: "!contains(github.event.head_commit.message, '[skip ci]')"
env:
# Use native docker command within docker-compose
COMPOSE_DOCKER_CLI_BUILD: 1
# Use buildkit to speed up docker command
DOCKER_BUILDKIT: 1
steps:
# This ensures only the most recently push commit will keep running.
- name: Cancel other active runs of this workflow
uses: rokroskar/workflow-run-cleanup-action@v0.2.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v2.3.1

- name: Serve app via docker-compose
run: docker-compose up --detach

- name: Run Cypress tests
uses: cypress-io/github-action@v1
env:
CYPRESS_BASE_URL: http://localhost
with:
working-directory: ./e2e
spec: cypress/integration/polis/**/*
browser: chrome

# NOTE: screenshots will be generated only if E2E test failed
# thus we store screenshots only on failures
- name: Save screenshot artefacts
uses: actions/upload-artifact@v2.0.1
if: failure()
with:
name: cypress-screenshots
path: e2e/cypress/screenshots

# Test run video was always captured, so this action uses "always()" condition
- name: Save video artefacts
uses: actions/upload-artifact@v2.0.1
if: always()
with:
name: cypress-videos
path: e2e/cypress/videos
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

17 changes: 15 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# Contributing to Polis

# Submitting Pull Requests
## :telephone_receiver: Open Calls

Before we can accept pull requests, you'll need you to sign the Polis Contributor Agreement. https://pol.is/contrib
:clock10: **When?** Every Saturday at 19:00 UTC (noon PT / 3pm ET / [your timezone][]) \
:raising_hand: **Where?** [`meet.jit.si/pol.is`](https://meet.jit.si/pol.is) (video chatroom) \
:pencil: **Call Notes**: [`bit.ly/polis-calls`](https://bit.ly/polis-calls)

[your timezone]: https://www.worldtimebuddy.com/event?lid=100%2C8%2C1668341%2C5&h=100&sts=26493120&sln=19-20&a=show&euid=d53410dd-f948-c1a4-3dde-31ac0adf894d

- We run **weekly** community calls, open to **anyone**.
- We especially welcome **newcomers**, and contributors who are **under-represented in open source!**
- If you can only drop by irregularly, then the **first call of the month is usually the most active**.

## :muscle: How We Work

- We're working on establishing our collaboration practices. Expect this section to be expanded very soon!
29 changes: 0 additions & 29 deletions Dockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions Dockerfile-db

This file was deleted.

4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,8 @@ the "copyright" line and a pointer to where the full notice is found.
Copyright (C) <year> <name of author>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
Expand Down
Loading

0 comments on commit a7b4adb

Please sign in to comment.