You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/end-to-end-tests.yml
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
name: End-to-end tests
1
+
name: Run tests
2
2
on: [push]
3
3
jobs:
4
4
test-suites:
@@ -30,5 +30,5 @@ jobs:
30
30
- name: Check that i18n and l10n are up to date
31
31
run: |
32
32
npx nx extract-i18n studio-web
33
-
if diff -w <(git show HEAD:packages/studio-web/src/i18n/messages.json | sort) <(sort < packages/studio-web/src/i18n/messages.json); then echo OK: The i18n database is up to date.; else echo ERROR: The i18n database is out of date.; npx nx check-fr-l10n studio-web || echo ERROR: The fr l10n database is also out of date.; false; fi
34
-
if npx nx check-fr-l10n studio-web; then echo OK: The fr l10n database is up to date.; else echo ERROR: The fr l10n database is out of date.; false; fi
33
+
if diff -w <(git show HEAD:packages/studio-web/src/i18n/messages.json | sort) <(sort < packages/studio-web/src/i18n/messages.json); then echo OK: The i18n database is up to date.; else echo ERROR: The i18n database is out of date.; npx nx check-l10n studio-web || echo ERROR: The l10n databases are also out of date.; false; fi
34
+
if npx nx check-l10n studio-web; then echo OK: The l10n databases are up to date.; else echo ERROR: An l10n database is out of date.; false; fi
There are separate production and development serving configurations
86
-
for each interface language, so you may for instance also use
87
-
`development-en`, `production-en`, `production-fr` for
89
+
for each interface language defined in `packages/studio-web/project.json`, so you may for instance also use
90
+
`development-en`, `production-en`, `development-es`, `production-es`, `production-fr`, etc for
88
91
`--configuration` above. Note that these configurations are _only_
89
92
for the `serve` command. To build for deployment, see
90
93
[below](#studio-web-2).
91
94
95
+
We have also defined targets `serve-fr` and `serve-es` in `project.json` so that you can launch the dev configs for all three supported languages at once with:
Note that you will need to also spin-up the ReadAlong-Studio API in order to have Studio-Web work properly. To do that, first clone the Python Package/API repo:
If your Studio sandbox is in a sibling directory to this sandbox, and you Python environment is active, `nx serve-web-api studio-web` will run that command for you.
109
+
If your Studio sandbox is in a sibling directory to this sandbox, and you Python environment is active, `npx nx serve-web-api studio-web` will run that command for you.
Studio-Web will automatically [publish](.github/workflows/publish.yml) to https://readalong-studio.mothertongues.org/ every time there is a change to `main`.
109
116
110
117
#### Understanding where the components come from when you run locally
111
118
112
-
When you run `nx serve studio-web`, that process is actually serving all the files needed
119
+
When you run `npx nx serve studio-web`, that process is actually serving all the files needed
113
120
by the Studio-Web application, and it's able to import `web-component` and `ngx-web-component`,
114
121
providing them to the application as needed.
115
122
116
123
However, `web-component` requires a build in order to have the .js files generated and available
117
124
to serve or import. In the instructions above, we actually show two methods you can use:
118
125
119
-
-`nx build web-component --watch` will only build that component, in production mode, and
126
+
-`npx nx build web-component --watch` will only build that component, in production mode, and
120
127
rebuild it any time you change that component's source code.
121
128
122
-
-`nx serve web-component` goes further, serving that component, which also requires building
129
+
-`npx nx serve web-component` goes further, serving that component, which also requires building
123
130
it. It also watches source code for changes. However, it produces a development build, which
124
131
may be different from the production build.
125
132
126
133
In this case, the web-component is being served on port 3333, but the Studio-Web app
127
-
just ignores that and uses the copy provided by `nx serve studio-web` instead.
134
+
just ignores that and uses the copy provided by `npx nx serve studio-web` instead.
128
135
129
136
### Testing
130
137
@@ -137,64 +144,87 @@ it launches on a different port, you will have to kill the currently
137
144
running process using that port, whose PID you can find with `fuser -n
138
145
tcp 3333`):
139
146
140
-
nx serve web-component
147
+
npx nx serve web-component
141
148
142
149
Make sure this command is serving the test data on port 5000:
The publication of the web component and its angular wrapper has been automated in the `release.yml` workflow. To trigger it, submit a pull request to the `release` branch and get it reviewed. Publication will happen when the PR is merged.
164
191
165
-
To publish the web component, first you must belong to the [@readalongs organization](https://www.npmjs.com/org/readalongs) on NPM. Then, bump the version number in both `packages/web-component/package.json` and `packages/ngx-web-component/package.json` and build both the web component and angular wrapper:
192
+
#### Web Component & Angular Wrapper - manually
166
193
167
-
nx build web-component
168
-
nx build ngx-web-component
194
+
WARNING: only use this process if the release workflow is broken.
169
195
170
-
Run the prepublish step for web-component:
196
+
To publish the web component, first you must belong to the [@readalongs organization](https://www.npmjs.com/org/readalongs) on NPM. Then, bump the version number in both `packages/web-component/package.json` and `packages/ngx-web-component/package.json`, run `npm install` to reflect that bump in `package-lock.json`, and build both the web component and angular wrapper:
0 commit comments