Skip to content
Closed
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
15 changes: 15 additions & 0 deletions .github/actions/setup-chrome/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Setup Chrome
description: Setup Chrome

runs:
using: 'composite'
steps:
- name: Install chrome
shell: bash
run: |
zypper addrepo http://dl.google.com/linux/chrome/rpm/stable/x86_64 Google-Chrome
curl https://dl.google.com/linux/linux_signing_key.pub
rpm --import linux_signing_key.pub
zypper -n refresh
zypper install --no-confirm google-chrome-stable
google-chrome --version
21 changes: 21 additions & 0 deletions .github/actions/setup-node/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Setup Node
description: Setup node, including yarn

runs:
using: 'composite'
steps:
- name: Install yarn
shell: bash
run: |
curl -fsSL -o ~/bin/yarn https://github.com/yarnpkg/yarn/releases/download/v1.22.17/yarn-1.22.17.js
chmod +x ~/bin/yarn
echo "~/bin" >> $GITHUB_PATH
- name: Ensure repo dir is accepted as safe by git (diff user)
shell: bash
run: |
git config --global --add safe.directory $PWD
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '14.x'
cache: 'yarn'
12 changes: 5 additions & 7 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ description: Setup node, python and call bootstrap script
runs:
using: 'composite'
steps:
- uses: actions/setup-node@v3
with:
node-version: '14.x'
- name: Setup Node
uses: ./.github/actions/setup-node

- name: Install Python for node-sass
shell: bash
run: |
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends python2
# We don't need to install python (for node-sass) as the base image contains it
# Note - we're on bci, so no apt-get, though there is zypper...
# Note - we're on bci, is not supported by actions/setup-python

- name: Install packages
shell: bash
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,30 @@ on:

jobs:
unit-test:
runs-on: ubuntu-latest
container: registry.suse.com/bci/python:3.12
runs-on: org-${{ github.repository_owner_id }}-amd64-k8s
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Run Setup
- name: Setup
uses: ./.github/actions/setup

- name: Setup Chrome
uses: ./.github/actions/setup-chrome

- name: Run tests
run: yarn test
lint:
runs-on: ubuntu-latest
container: registry.suse.com/bci/python:3.12
runs-on: org-${{ github.repository_owner_id }}-amd64-k8s
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Run Setup
- name: Setup
uses: ./.github/actions/setup

- name: Run linter
Expand Down