Skip to content

Commit

Permalink
Merge pull request #292 from EyeSeeTea/chore/github-workflow
Browse files Browse the repository at this point in the history
chore: add CI workflow on push (localize, jest, tsc)
  • Loading branch information
MiquelAdell authored Jun 13, 2024
2 parents e77272e + e936e64 commit b03104b
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Application testing
on:
push:
workflow_dispatch:
jobs:
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install apt libraries
run: sudo apt install gettext -y

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: "16.14.0"

- name: Install yarn
run: npm install -g yarn

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache yarn dependencies
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile --silent

- name: Install translations
run: yarn localize

- name: Run jest tests
run: yarn test

- name: Run typescript tests
run: npx tsc
5 changes: 5 additions & 0 deletions src/react-app-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="react-scripts" />
declare module "*.png";
declare module "*.svg";
declare module "*.jpeg";
declare module "*.jpg";

0 comments on commit b03104b

Please sign in to comment.