Skip to content

Commit ff1da3c

Browse files
authored
fix: update to dev.97 (#14)
1 parent b24a2f4 commit ff1da3c

File tree

23 files changed

+21641
-494
lines changed

23 files changed

+21641
-494
lines changed

.github/workflows/ci.yml

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ on:
33
pull_request:
44
branches:
55
- main
6-
push:
7-
branches-ignore:
8-
- main
96

107
concurrency:
118
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -58,28 +55,36 @@ jobs:
5855
node-version-file: '.nvmrc'
5956
cache: 'npm'
6057
cache-dependency-path: ${{ matrix.project }}/package-lock.json
61-
- name: Build for Cypress
58+
- name: Run Cypress
6259
uses: cypress-io/github-action@v6
60+
if: matrix.project != 'react-app'
6361
with:
6462
working-directory: ${{ matrix.project }}
6563
build: npm run build -- --logLevel error
66-
runTests: false
64+
browser: ${{ matrix.browser }}
65+
start: npm start
6766
- name: Run Cypress
67+
if: matrix.project == 'react-app'
6868
uses: cypress-io/github-action@v6
6969
with:
7070
working-directory: ${{ matrix.project }}
71-
start: npm start
71+
start: npm run serve
7272
browser: ${{ matrix.browser }}
73-
install: false
73+
install: true
74+
- uses: actions/upload-artifact@master
75+
if: always()
76+
with:
77+
name: ${{ matrix.project}}-cypress-report
78+
path: ${{ matrix.project }}/${{ matrix.project }}-cypress-report.xml
7479
- uses: actions/upload-artifact@master
7580
if: failure()
7681
with:
77-
name: screenshots
82+
name: ${{ matrix.project }}-screenshots
7883
path: ${{ matrix.project }}/cypress/screenshots
7984
- uses: actions/upload-artifact@master
8085
if: failure()
8186
with:
82-
name: videos
87+
name: ${{ matrix.project }}-videos
8388
path: ${{ matrix.project }}/cypress/videos
8489
test-unit:
8590
name: Test (Unit)
@@ -102,10 +107,30 @@ jobs:
102107
- name: Install Dependencies
103108
run: npm ci
104109
- name: Run Unit Tests
105-
run: npm test -- --reporter=xunit --reporter-options output=unit-tests.xml
106-
- name: Report Results
107-
uses: EnricoMi/publish-unit-test-result-action@v2
110+
run: npm test -- --reporter=xunit --reporter-options output=${{matrix.project}}-unit-tests.xml
111+
- name: Upload Test Results
108112
if: always()
113+
uses: actions/upload-artifact@v4
114+
with:
115+
name: Test Results (${{matrix.project}})
116+
path: ${{matrix.project}}/${{matrix.project}}-unit-tests.xml
117+
publish-test-results:
118+
name: "Publish Tests Results"
119+
needs:
120+
- test-unit
121+
- test-ui
122+
runs-on: ubuntu-latest
123+
permissions:
124+
checks: write
125+
pull-requests: write
126+
if: always()
127+
steps:
128+
- name: Download Artifacts
129+
uses: actions/download-artifact@v4
130+
with:
131+
path: artifacts
132+
133+
- name: Publish Test Results
134+
uses: EnricoMi/publish-unit-test-result-action@v2
109135
with:
110-
files: |
111-
${{ matrix.project }}/unit-tests.xml
136+
files: "artifacts/**/*.xml"

html-web-page/cypress.config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ import { defineConfig } from 'cypress';
33
const port = Number.parseInt(process.env.ROMCAL_APP_PORT ?? '3000', 10);
44

55
export default defineConfig({
6+
reporter: 'junit',
7+
reporterOptions: {
8+
mochaFile: 'html-web-page-cypress-report.xml',
9+
toConsole: true,
10+
},
611
e2e: {
712
baseUrl: `http://localhost:${port}`,
813
supportFile: false,

html-web-page/cypress/e2e/load.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ describe('Load', () => {
66

77
cy.get('#calendar').find('div').should('have.length', 2).as('messages');
88
cy.get('@messages').eq(0).should('have.text', 'All definitions, which are all possible liturgical days of a specific calendar, that can occur during a whole year:');
9-
cy.get('@messages').eq(1).should('have.text', 'A calendar that contains all liturgical days occurring during 2024:');
9+
cy.get('@messages').eq(1).should('have.text', `A calendar that contains all liturgical days occurring during ${new Date().getUTCFullYear()}:`);
1010

1111
cy.get('#calendar').find('pre').should('have.length', 2).as('codes');
1212
cy.get('@codes').eq(0).should('include.text', 'mary_mother_of_god');

html-web-page/package-lock.json

Lines changed: 29 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

html-web-page/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
{
22
"name": "romcal-html-web-page-example",
33
"scripts": {
4-
"prestart": "cp node_modules/romcal/dist/iife/romcal.js public/romcal/romcal.js && cp node_modules/@romcal/calendar.france/iife/fr.js public/romcal/fr.js",
4+
"prestart": "cp ../node_modules/romcal/rites/roman1969/dist/iife/romcal.js public/romcal/romcal.js && cp node_modules/@romcal/calendar.france/iife/fr.js public/romcal/fr.js",
55
"start": "http-server -g -p ${ROMCAL_APP_PORT:-3000} ./public",
66
"build": "exit 0",
7-
"test:ui": "cypress run"
7+
"test:ui": "cypress run",
8+
"dev:link": "ROMCAL_ALIAS=\"../${ROMCAL_ALIAS:-romcal}\" bash ../scripts/link.sh"
89
},
910
"dependencies": {
10-
"@romcal/calendar.france": "3.0.0-dev.81",
11-
"@romcal/calendar.general-roman": "3.0.0-dev.81",
11+
"@romcal/calendar.france": "3.0.0-dev.97",
12+
"@romcal/calendar.general-roman": "3.0.0-dev.97",
1213
"http-server": "^14.1.1",
13-
"romcal": "3.0.0-dev.81"
14+
"romcal": "3.0.0-dev.97"
1415
},
1516
"license": "MIT",
1617
"devDependencies": {

0 commit comments

Comments
 (0)