Skip to content

Commit

Permalink
Create ci-tests.yml for running tests in pipeline (#105)
Browse files Browse the repository at this point in the history
* Create ci-tests.yml for running tests in pipeline

* PXWEB2-166 Add command for running tests in all projects (#104)

Since we need to run tests easily, in various places, we need a script
for running all tests easily.


Co-authored-by: Kent Mossbaeck <>
Co-authored-by: Michael Pande <>
Co-authored-by: Per Inge Vaaje <[email protected]>
Co-authored-by: Mikael Nordberg <[email protected]>

* Delete old, failing test from app
  • Loading branch information
SjurSutterudSagen authored Apr 9, 2024
1 parent a68d8f8 commit f56c607
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI Tests

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm test
5 changes: 0 additions & 5 deletions apps/pxweb2/src/app/app.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,4 @@ describe('App', () => {
const { baseElement } = render(<App />);
expect(baseElement).toBeTruthy();
});

it('should have a greeting as the title', () => {
const { getByText } = render(<App />);
expect(getByText(/Welcome pxweb2/gi)).toBeTruthy();
});
});

0 comments on commit f56c607

Please sign in to comment.