Skip to content

Commit

Permalink
CI: Inline scripts into workflow
Browse files Browse the repository at this point in the history
This makes it easier to skip steps for dependabot PRs, and possibly
makes better use of the UI.
  • Loading branch information
emdash-ie committed Jul 17, 2023
1 parent 5d4d5df commit a09d867
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 43 deletions.
43 changes: 39 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ jobs:
node-version-file: './.nvmrc'
cache: 'yarn'

- name: Build project and generate Riff-Raff artefact
run: ./script/ci.sh
- name: Yarn
run: |
yarn clean
yarn install
yarn run build
- name: Run unit tests
run: yarn test --silent
Expand All @@ -58,8 +61,40 @@ jobs:
TEST_DB_USER: postgres
TEST_DB_PASSWORD: postgres

- name: Generate CFN templates from GuCDK
run: ./script/cfn.sh
- name: Copy files to Riff Raff package
if: >-
github.actor != 'dependabot[bot]'
&& github.event.pull_request.user.login != 'dependabot[bot]'
run: cp package.json riff-raff.yaml target

- name: Yarn install in package
if: >-
github.actor != 'dependabot[bot]'
&& github.event.pull_request.user.login != 'dependabot[bot]'
working-directory: ./target
run: yarn install --production

- name: Zip target directory contents (quietly)
if: >-
github.actor != 'dependabot[bot]'
&& github.event.pull_request.user.login != 'dependabot[bot]'
run: zip -qr ../support-reminders.zip ./*
working-directory: ./target

- name: Yarn (CDK)
working-directory: cdk
run: |
yarn install
yarn tsc
yarn lint
yarn test
- name: Yarn synth (CDK)
if: >-
github.actor != 'dependabot[bot]'
&& github.event.pull_request.user.login != 'dependabot[bot]'
working-directory: cdk
run: yarn synth

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
Expand Down
14 changes: 0 additions & 14 deletions script/cfn.sh

This file was deleted.

25 changes: 0 additions & 25 deletions script/ci.sh

This file was deleted.

0 comments on commit a09d867

Please sign in to comment.