This repository has been archived by the owner on Nov 28, 2024. It is now read-only.
New nodejs base image #265
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
jobs: | |
tests: | |
name: Run linter and tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
run: yarn install | |
- name: Lint | |
run: yarn lint | |
- name: Check i18n | |
shell: bash | |
run: | | |
yarn i18n | |
GIT_STATUS="$(git status --short --untracked-files locales)" | |
if [ -n "$GIT_STATUS" ]; then | |
echo "i18n files are not up to date. Commit them to fix." | |
git diff | |
exit 1 | |
fi | |
- name: Test | |
run: yarn test:coverage | |
- name: Build | |
run: yarn build | |
docker-image: | |
runs-on: ubuntu-latest | |
env: | |
BUILDX_NO_DEFAULT_ATTESTATIONS: 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x | |
push: false | |
e2e-tests: | |
name: Run e2e tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install kinD | |
run: | | |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.17.0/kind-linux-amd64 | |
chmod +x ./kind | |
sudo mv ./kind /usr/local/bin/kind | |
- name: Install k8s and oc | |
run: | | |
curl -LO https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz | |
tar -xvf oc.tar.gz | |
sudo install oc /usr/local/bin/oc | |
sudo install kubectl /usr/local/bin/kubectl | |
- name: Install podman | |
run: | | |
sudo apt-get -y install podman | |
- name: Create Cluster | |
run: | | |
yarn create-cluster | |
yarn login-cluster | |
- name: Cypress run | |
uses: cypress-io/[email protected] | |
with: | |
start: yarn dev, yarn start-console | |
wait-on: "http://localhost:9001" | |
browser: chrome | |
headed: false | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: cypress-videos | |
path: cypress/videos |