Skip to content

Commit

Permalink
Merge pull request #84 from DFE-Digital/develop
Browse files Browse the repository at this point in the history
Release 1
  • Loading branch information
jacksonj04 authored Jul 29, 2022
2 parents e422fc6 + eb101c1 commit ee9734d
Show file tree
Hide file tree
Showing 172 changed files with 5,971 additions and 303 deletions.
1 change: 1 addition & 0 deletions .adr-dir
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
doc/decisions
93 changes: 93 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
## IMPORTANT ##
#
# Usually a pattern here also belongs in your `.gitignore` file and vice versa.
#
# Note that Docker's ignore syntax is slightly different to Git's. The main
# difference is that Git interprets patterns without a leading slash as applying
# to any subdirectory, while Docker interprets them as relative to the project
# root directory. To resolve that, a `.dockerignore` should prefix those
# patterns with `**/`. This is also compatible with Git.
#
# This file is NOT a substitute for being intentional in copying directories to
# a Docker image. Avoid use of `COPY . <destination>` in your `Dockerfile`s.
#
## How to use this file
#
# Add patterns to the section they apply to, sorted by:
#
# 1. absolute paths to or patterns for files (with a `/` prefix)
# 2. absolute paths to or patterns for directories
# 3. relative paths to or patterns for files (with a `**/` prefix)
# 4. relative paths to or patterns for directories
# 5. pattern exceptions (sorted as above)
#
# Sort them alphanumerically within each section.
#
# If no section fits, create one. No path or pattern should exist without a
# section or label.
#

## Sensitive files
#
# Note that these patterns will ignore any files matched by their equivalents in
# `.gitignore`. This is probably what you want in many cases, but you may need
# to add exceptions here if you really want to include them in your Docker
# images. An exception is a more specific pattern (ideally a fully specified
# path without any wildcards) prefixed with a `!` and must be defined after the
# pattern it's excepting (which will happen naturally if you're following the
# sort order above).
#
### Databases
**/*.db*
**/*.dump*
**/*.sql*
**/*.sqlite3*
### Environment variables
**/.env
**/.env.*
### Logs
**/*.log*
### Secrets and keys
**/*.crt*
**/*.key*
**/*.pem*
### Spreadsheet data
**/*.bks*
**/*.csv*
**/*.dex*
**/*.numbers*
**/*.ods*
**/*.ots*
**/*.tsv*
**/*.xlr*
**/*.xls*
### Terraform
**/.terraformrc*
**/terraform.rc*
**/*.tfstate*
**/*.tfvars*
**/.terraform/
### XML data
**/*.xml*

## Dependencies
/Brewfile.lock.json
/node_modules/
/vendor/bundle/

## Temporary files
/coverage/
/log/
**/tmp/

## Build artefacts
/public/assets/

## Docker specific patterns ##
#
### Dependencies
/Brewfile
### Workflow configuration
/.github/
### git stuff
/.git/
10 changes: 10 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Dotenv
#
# This file commits safe environment variables for the development environment.
# For managing sensitive values and overrides use `/.env.development.local`
#
# If a required key is added, make sure it is also added in `config/initializers/dotenv.rb`
#
# Reference: https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use

DATABASE_URL=postgres://postgres@localhost:5432/dfe-complete-academies-development
22 changes: 22 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Dotenv
#
# This file documents all of the values required my the application.
#
# Never include sensitive values in this file!
#
# If a required key is added, make sure it is also added in `config/initializers/dotenv.rb`
#
# Reference: https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use

DATABASE_URL=postgres://postgres@localhost:5432/database-name

# Azure Active Directory
#
# Admin url: https://portal.azure.com.mcas.ms/#view/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade/~/Overview/appId/05b7db93-6384-4b44-9d27-23eb6bd97366/isMSAApp~/false
AZURE_APPLICATION_CLIENT_ID=AZURE_APPLICATION_CLIENT_ID
AZURE_APPLICATION_CLIENT_SECRET=AZURE_APPLICATION_CLIENT_SECRET
AZURE_TENANT_ID=AZURE_TENANT_ID

ACADEMIES_API_HOST=https://api.example.com
ACADEMIES_API_KEY=a1b2c3-d4e5f6
ACADEMIES_API_TIMEOUT=0.6
17 changes: 17 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Dotenv
#
# This file commits safe environment variables for the test environment.
# For managing sensitive values and overrides use `/.env.test.local`
#
# If a required key is added, make sure it is also added in `config/initializers/dotenv.rb`
#
# Reference: https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use

DATABASE_URL=postgres://postgres@localhost:5432/dfe-complete-academies-test

# Azure Active Directory
#
# Admin url: https://portal.azure.com.mcas.ms/#view/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade/~/Overview/appId/05b7db93-6384-4b44-9d27-23eb6bd97366/isMSAApp~/false
AZURE_APPLICATION_CLIENT_ID=AZURE_APPLICATION_CLIENT_ID
AZURE_APPLICATION_CLIENT_SECRET=AZURE_APPLICATION_CLIENT_SECRET
AZURE_TENANT_ID=AZURE_TENANT_ID
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/log/
/tmp/
/vendor/
/public/assets
/coverage
7 changes: 7 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": ["eslint:recommended", "prettier"],
"env": {
"browser": true,
"es6": true
}
}
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Changes

_Add a summary of the changes in this pull request_

## Checklist

- [ ] Attach this pull request to the appropriate card in Trello.
- [ ] Update the `CHANGELOG.md` if needed.
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Checklist

- [ ] Check that this pull request has the correct version number.
- [ ] Attach this pull request to the appropriate card in Trello.
- [ ] Update the `CHANGELOG.md` to move Unreleased changes into a new version.
- [ ] Update the release links at the bottom of `CHANGELOG.md` to reflect the
new version.
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
time: "11:00"
timezone: Europe/London
open-pull-requests-limit: 10
versioning-strategy: auto
target-branch: develop
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "11:00"
timezone: Europe/London
open-pull-requests-limit: 10
versioning-strategy: auto
target-branch: develop
43 changes: 43 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Continuous integration

on:
pull_request:
push:
branches:
- main
- develop

jobs:
test:
runs-on: ubuntu-latest

env:
RAILS_ENV: test

steps:
- name: Check out code
uses: actions/checkout@v2

- id: cache-docker
uses: actions/cache@v2
with:
path: /tmp/docker-save
key:
docker-save-${{ hashFiles('Dockerfile', 'Gemfile.lock',
'package-lock.json') }}

- if: steps.cache-docker.outputs.cache-hit == 'true'
name: Load cached Docker image
run: docker load -i /tmp/docker-save/snapshot.tar || true

- name: Build
run: script/ci/cibuild

- name: Test
run: script/ci/test

- if: always() && steps.cache-docker.outputs.cache-hit != 'true'
name: Prepare Docker cache
run:
mkdir -p /tmp/docker-save && docker save app_test:latest -o
/tmp/docker-save/snapshot.tar && ls -lh /tmp/docker-save
12 changes: 12 additions & 0 deletions .github/workflows/tasks-completed-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "PR Tasks Completed Check"
on:
pull_request:
types: [opened, edited]

jobs:
task-check:
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/task-completed-checker-action@v0.1.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
108 changes: 93 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,103 @@
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
## IMPORTANT ##
#
# Usually a pattern here also belongs in your `.dockerignore` file and vice
# versa.
#
# Note that Docker's ignore syntax is slightly different to Git's. The main
# difference is that Git interprets patterns without a leading slash as applying
# to any subdirectory, while Docker interprets them as relative to the project
# root directory. To resolve that, a `.dockerignore` should prefix those
# patterns with `**/`. This is also compatible with Git.
#
## How to use this file
#
# Add patterns to the section they apply to, sorted by:
#
# 1. absolute paths to or patterns for files (with a `/` prefix)
# 2. absolute paths to or patterns for directories
# 3. relative paths to or patterns for files (without a `/` prefix)
# 4. relative paths to or patterns for directories
# 5. pattern exceptions (sorted as above)
#
# Sort them alphanumerically within each section.
#
# If no section fits, create one. No path or pattern should exist without a
# section or label.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config.
/.bundle
## Sensitive files
#
# To override these ignored files on a case-by-case basis,
# instead of adding a rule to this file, force add them:
#
# ```
# git add path/to/file --force
# ```
#
# This reduces the risk of accidentally committing files that happen to match
# the ignore pattern exception, or a file being removed and readded
# unintentionally in the future.
#
### Databases
*.db*
*.dump*
*.sql*
*.sqlite3*
### Environment variables
.env
.env.*
### Logs
*.log*
### Secrets and keys
*.crt*
*.key*
*.pem*
### Spreadsheet data
*.bks*
*.csv*
*.dex*
*.numbers*
*.ods*
*.ots*
*.tsv*
*.xlr*
*.xls*
### Terraform
.terraformrc*
terraform.rc*
*.tfstate*
*.tfvars*
.terraform/
### XML data
*.xml*

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep
## Dependencies
/Brewfile.lock.json
/node_modules/
/vendor/bundle/

# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep
## Temporary files
/coverage/
/log/
tmp/

## Build artefacts
/public/assets/

/public/assets

# Ignore master key for decrypting credentials and more.
/config/master.key

# Dependencies
/Brewfile.lock.json
/.bundle/
/node_modules/
/vendor/bundle/

## Dotenv
.env.local
.env.*.local

# Ignore Rspec persisted failure list
/spec/examples.txt
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
17.8.0
Loading

0 comments on commit ee9734d

Please sign in to comment.