Skip to content

Commit

Permalink
Merge pull request #16 from lysz210/LYS-21-rilasciare-la-sottosezione…
Browse files Browse the repository at this point in the history
…-risultati-unittest-e-coverage

LYS-21-rilasciare-la-sottosezione-risultati-unittest-e-coverage
  • Loading branch information
lysz210 authored Jan 21, 2025
2 parents 27160bc + 5f9721c commit c83bb76
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 30 deletions.
65 changes: 37 additions & 28 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,36 @@ name: Deploy photos
on:
push:
branches:
- LYS-20-rilasciare-la-sottosezione-risultati-bdd
# - master
- master

jobs:
tests:
uses: ./.github/workflows/test.yaml
# deploy:
# needs:
# - tests
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ ubuntu-latest ]
# node: [ 22 ]
# steps:
# - uses: actions/checkout@v4
# # todo build steps
# # deploy
# - name: Pulumi dependencies
# working-directory: pulumi
# run: npm ci
# - uses: pulumi/actions@v6
# with:
# command: up
# stack-name: lysz210/photos/dev
# work-dir: pulumi
# env:
# PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_REGION: ${{ secrets.AWS_REGION }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
deploy:
needs:
- tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
node: [ 22 ]
steps:
- uses: actions/checkout@v4
# todo build steps
# deploy
- name: Pulumi dependencies
working-directory: pulumi
run: npm ci
- uses: pulumi/actions@v6
with:
command: up
stack-name: lysz210/photos/dev
work-dir: pulumi
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
docs:
needs:
- tests
Expand All @@ -52,7 +51,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: docs
path: ${{ github.workspace }}/.reports/docs
path: .reports/docs
if-no-files-found: error
pages:
needs:
Expand All @@ -73,6 +72,16 @@ jobs:
with:
name: bdd
path: bdd
- name: Download unit tests reports
uses: actions/download-artifact@v4
with:
name: unit
path: unit
- name: Download code coverage reports
uses: actions/download-artifact@v4
with:
name: coverage
path: coverage
- name: Deploy pages
uses: peaceiris/actions-gh-pages@v4
with:
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,23 @@ jobs:
run: npm ci
- name: Run Unit tests with coverage
run: npm run test:unit
- name: Upload unit tests results to artifacts
uses: actions/upload-artifact@v4
with:
name: unit
path: .reports/unit
if-no-files-found: error
- name: Upload code coverage to artifacts
uses: actions/upload-artifact@v4
with:
name: coverage
path: .reports/coverage
if-no-files-found: error
- name: Run Bdd
run: npm run test:bdd
- name: Upload Bdd test results to artifacts
uses: actions/upload-artifact@v4
with:
name: bdd
path: ${{ github.workspace }}/.reports/bdd
path: .reports/bdd
if-no-files-found: error
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ master deploy status [![photos](https://github.com/lysz210/photos/actions/workfl

# Test results

[Bdd results](https://lysz210.github.io/photos/bdd)
[Bdd results](https://lysz210.github.io/photos/bdd)

[Unit tests results](https://lysz210.github.io/photos/unit)

[Code coverage](https://lysz210.github.io/photos/coverage)

0 comments on commit c83bb76

Please sign in to comment.