Skip to content

Commit

Permalink
ci: turn 'lint' job into a step
Browse files Browse the repository at this point in the history
  • Loading branch information
rosado committed Jul 26, 2024
1 parent 4eefcd6 commit 49c1be8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 24 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/deploy-to-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@ name: Deploy To Development

on: [workflow_dispatch]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
npm ci
npm run lint
jobs:
test:
runs-on: ubuntu-latest
environment: development
Expand All @@ -25,21 +17,22 @@ jobs:
with:
node-version: '20.x'
- id: install-node-dependencies
run: |
npm ci
run: npm ci
- id: lint
run: npm run lint
- uses: ./.github/actions/playwright-setup
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.DEPLOY_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.DEPLOY_AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2

- uses: aws-actions/amazon-ecr-login@v2

- id: run-with-docker-compose
run: docker compose --progress plain -f docker-compose-real-backend.yml up -d

- id: docker-compose-ps
name: Check docker compose output
run: |
sleep 30
docker compose --progress plain -f docker-compose-real-backend.yml ps
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,7 @@ on:
type: environment
description: The environment to deploy to.

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
npm ci
npm run lint
jobs:
test:
runs-on: ubuntu-latest
environment: development
Expand All @@ -31,21 +23,23 @@ jobs:
with:
node-version: '20.x'
- id: install-node-dependencies
run: |
npm ci
run: npm ci
- id: lint
run: npm run lint
- uses: ./.github/actions/playwright-setup

- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.DEPLOY_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.DEPLOY_AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2

- uses: aws-actions/amazon-ecr-login@v2

- id: run-with-docker-compose
run: docker compose --progress plain -f docker-compose-real-backend.yml up -d

- id: docker-compose-ps
name: Check docker compose output
run: |
sleep 30
docker compose --progress plain -f docker-compose-real-backend.yml ps
Expand Down

0 comments on commit 49c1be8

Please sign in to comment.