Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,32 @@ jobs:
- name: Setup E2E Environment
uses: ./.github/actions/setup-e2e

- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Resolve Playwright version
id: playwright-version
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> "$GITHUB_OUTPUT"

- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}

- name: Install Playwright browsers and system deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
timeout-minutes: 15
env:
DEBIAN_FRONTEND: noninteractive
NEEDRESTART_MODE: a
run: npx playwright install --with-deps chromium

- name: Install Playwright system deps only
if: steps.playwright-cache.outputs.cache-hit == 'true'
timeout-minutes: 15
env:
DEBIAN_FRONTEND: noninteractive
NEEDRESTART_MODE: a
run: npx playwright install-deps chromium

- name: Run Playwright tests
run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
Expand Down
10 changes: 5 additions & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = function(grunt) {
// them too. Invokes gettext.js's shipped po2json CLI directly so we don't have to depend on
// @superdesk/build-tools at runtime (it's a devDependency and may not be installed when this
// Gruntfile is consumed from another project).
grunt.registerTask('po-to-json', 'Compile po/*.po to dist/languages/*.json', function() {
grunt.registerTask('po-to-json', 'Compile po/*.po to dist/languages/*.json', () => {
var fs = require('fs');
var distDir = grunt.config.get('distDir');
var poDir = path.join(__dirname, 'po');
Expand All @@ -68,7 +68,7 @@ module.exports = function(grunt) {

fs.mkdirSync(jsonDir, {recursive: true});

fs.readdirSync(poDir).forEach(function(filename) {
fs.readdirSync(poDir).forEach((filename) => {
var poFile = path.join(poDir, filename);

if (!filename.endsWith('.po') || fs.statSync(poFile).isDirectory()) {
Expand All @@ -86,19 +86,19 @@ module.exports = function(grunt) {
// from a fresh checkout without needing an external wrapper command. Each task
// requires @superdesk/build-tools lazily inside the action so a missing dep doesn't
// break Gruntfile load for callers that don't need these tasks.
grunt.registerTask('install-extensions', 'Install each loaded extension', function() {
grunt.registerTask('install-extensions', 'Install each loaded extension', () => {
var installExtensions = require('@superdesk/build-tools/src/extensions/install-extensions');

installExtensions(process.cwd());
});

grunt.registerTask('namespace-css', 'Generate the namespaced extension stylesheet', function() {
grunt.registerTask('namespace-css', 'Generate the namespaced extension stylesheet', () => {
var {namespaceCSS} = require('@superdesk/build-tools/src/extensions/css');

namespaceCSS(process.cwd());
});

grunt.registerTask('merge-extension-translations', 'Merge translations from loaded extensions', function() {
grunt.registerTask('merge-extension-translations', 'Merge translations from loaded extensions', () => {
var {mergeTranslationsFromExtensions} = require('@superdesk/build-tools/src/extensions/translations');

mergeTranslationsFromExtensions(process.cwd());
Expand Down
232 changes: 0 additions & 232 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading