Skip to content

Commit

Permalink
Merge pull request #285 from UKHomeOffice/ASL-4247_GHA_TR
Browse files Browse the repository at this point in the history
ASL-4247 Moves the CI from drone to GitHub Actions
  • Loading branch information
tomrowsell86 authored Mar 30, 2023
2 parents 21925cd + 4bbb823 commit fdfce50
Show file tree
Hide file tree
Showing 99 changed files with 4,544 additions and 5,642 deletions.
35 changes: 0 additions & 35 deletions .drone-1.0.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .eslintrc

This file was deleted.

75 changes: 75 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
module.exports = {
'env': {
'node': true,
'browser': true,
'commonjs': true,
'es6': true
},
'extends': [
'eslint:recommended',
'plugin:react/recommended'
],
'parserOptions': {
'ecmaVersion': 2020,
'sourceType': 'module'
},
'settings': {
'react': {
'version': 'detect'
}
},
'rules': {
'react/prop-types': 'off',
'indent': [
'error',
4
, { 'SwitchCase': 1 }
],
'linebreak-style': [
'error',
'unix'
],
'no-unused-vars': [
'error',
{ 'argsIgnorePattern': '^_$' }
],
'quotes': [
'error',
'single'
],
'semi': [
'error',
'always'
],
'object-curly-spacing': [
'error', 'always'
],
'no-trailing-spaces': [
'error'
]
},
'overrides': [
{
'files': [ '**/__tests__/**' ],
'env': {
'jest': true
},
'globals': {
'render': false,
'shallow': false,
'wrapper': false,
'mount': false
}
},
{
'files': [ '**/__snapshots__/**' ],
'excludedFiles': '*.js.snap'
},
{
'files': [ 'src/**' ],
'env': {
'commonjs': true
}
}
]
};
28 changes: 28 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "⬆️ "
pull-request-branch-name:
separator: "-"
reviewers:
- "UKHomeOffice/asl-devs"
labels:
- "skip-release"
- "dependencies"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "⬆️ "
pull-request-branch-name:
separator: "-"
reviewers:
- "UKHomeOffice/asl-devs"
labels:
- "patch"
- "dependencies"
39 changes: 39 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "CodeQL Scan"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '45 12 * * 1'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
9 changes: 9 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: 'Publish - npm'
on:
pull_request:
types: [ closed ]

jobs:
publish:
uses: UKHomeOffice/sas-github-workflows/.github/workflows/publish-npm.yml@v1
secrets: inherit
10 changes: 10 additions & 0 deletions .github/workflows/semver-check-increment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: 'Increment Version - npm'
on:
pull_request:
types: [ labeled, unlabeled, opened, reopened, synchronize ]

jobs:
version:
uses: UKHomeOffice/sas-github-workflows/.github/workflows/semver-check-increment-npm.yml@v1
with:
mainLineBranchName: master
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'Test'
on:
pull_request:
types: [ opened, reopened, synchronize ]

jobs:
test:
uses: UKHomeOffice/sas-github-workflows/.github/workflows/test-npm.yml@v1
secrets: inherit
with:
lintCommand: 'test:lint'
testCommand: 'run test:unit'

8 changes: 3 additions & 5 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
@asl:registry = https://artifactory.digital.homeoffice.gov.uk/artifactory/api/npm/npm-virtual/
@ukhomeoffice:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}


//artifactory.digital.homeoffice.gov.uk/artifactory/api/npm/npm-virtual/:username=${NPM_AUTH_USERNAME}
//artifactory.digital.homeoffice.gov.uk/artifactory/api/npm/npm-virtual/:_password=${NPM_AUTH_TOKEN}
//artifactory.digital.homeoffice.gov.uk/artifactory/api/npm/npm-virtual/:email=leonard.martin@digital.homeoffice.gov.uk
//artifactory.digital.homeoffice.gov.uk/artifactory/api/npm/npm-virtual/:always-auth=true
2 changes: 0 additions & 2 deletions enzyme.setup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint implicit-dependencies/no-implicit: [2, { dev: true }] */

const { configure } = require('enzyme');
const Adapter = require('enzyme-adapter-react-16');

Expand Down
6 changes: 3 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
setupFilesAfterEnv: [
'<rootDir>/enzyme.setup.js'
]
setupFilesAfterEnv: [
'<rootDir>/enzyme.setup.js'
]
};
Loading

0 comments on commit fdfce50

Please sign in to comment.