Skip to content

Commit

Permalink
Merge pull request #1349 from guardian/mm/ci-gha
Browse files Browse the repository at this point in the history
Use GitHub Actions for CI
  • Loading branch information
coldlink authored Jan 6, 2022
2 parents 85ec804 + 62872e6 commit a4b6c1d
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 38 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI
on: push
jobs:
CI:
name: Continuous Integration
runs-on: ubuntu-latest
permissions:
# required by guardian/actions-assume-aws-role
id-token: write
contents: read
steps:
- uses: actions/checkout@v2
- uses: guardian/actions-assume-aws-role@v1.0.0
with:
awsRoleToAssume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
- uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: ./ci.sh
12 changes: 0 additions & 12 deletions .github/workflows/jest.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/workflows/lint.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/workflows/typescript.yml

This file was deleted.

7 changes: 6 additions & 1 deletion ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

set -ae

# Don't remove this line as it's used to number the build based on the
# last build number in teamcity
LAST_TEAMCITY_BUILD=5000
export GITHUB_RUN_NUMBER=$(( $GITHUB_RUN_NUMBER + $LAST_TEAMCITY_BUILD ))

yarn install --frozen-lockfile
yarn lint
yarn test
yarn build
yarn riffraff
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"mock-server": "node util/mock-server.js",
"riffraff": "node-riffraff-artifact",
"start": "node ./build/server.js",
"test": "yarn tsc && yarn test:unit",
"test": "yarn lint && yarn tsc && yarn test:unit",
"test:unit": "jest --ci",
"tsc": "tsc --noEmit --skipLibCheck",
"tsc:cypress": "tsc --noEmit --skipLibCheck --project cypress/tsconfig.json",
Expand Down

0 comments on commit a4b6c1d

Please sign in to comment.