Skip to content

Commit

Permalink
Update README and refactor github actions (#2)
Browse files Browse the repository at this point in the history
Add deploy step into GH actions and refactor
  • Loading branch information
GCHQDeveloper81 authored Jul 16, 2024
1 parent 4dfa8f9 commit bdccf92
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 58 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/e2e.yml

This file was deleted.

98 changes: 78 additions & 20 deletions .github/workflows/test+deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
branches: ['main']

jobs:
# **********************
# Build
# **********************
build:
runs-on: ubuntu-latest
steps:
Expand All @@ -33,35 +36,90 @@ jobs:
- name: Copyright check
run: npm run copyright:check

- name: Linter
- name: Linting and Code Quality
run: npm run lint

- name: Build app
- name: Build
env:
BASE_PATH: '/${{ github.event.repository.name }}'
run: npm run build

- name: Component and Unit tests
run: npm run test:unit+component

- name: Upload build artifact
uses: actions/upload-artifact@v2
with:
name: build
path: build
if-no-files-found: error
# deploy:
# needs: build
# runs-on: ubuntu-latest
# permissions:
# pages: write
# id-token: write
#
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
#
# steps:
# - name: Deploy
# id: deployment
# uses: actions/deploy-pages@v4

# **********************
# Unit + component tests
# **********************
unit_and_component_tests:
name: 'Unit and component tests'
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v3
with:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: 20.15.1
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Component and Unit tests
run: npm run test:unit+component

# **********************
# End to end tests
# **********************
e2e_tests:
runs-on: ubuntu-latest
needs: build
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: 20.15.1

- name: Install dependencies
run: npm ci

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Run Playwright tests
run: npm run test:e2e -- --reporter=html

# **********************
# Deploy
# **********************

deploy:
needs: [build, e2e_tests, unit_and_component_tests]
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- uses: actions/download-artifact@v2
with:
name: build
path: build

- name: Deploy
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Before making a new one, please search the existing issues to check if your chan

## Contributing code

We follow a branching strategy for handling contributions:
Prior to us accepting any work, you must sign the [GCHQ CLA Agreement](https://cla-assistant.io/gchq/ld-explorer). We follow a branching strategy for handling contributions:

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/new_thing`)
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Copyright 2024 [Crown Copyright](https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/)

LD-Explorer is the _missing tool_ for exploring and experimenting with linked data resources directly in the browser.
LD-Explorer is a prototype user interface built upon the [Comunica graph querying framework](https://comunica.dev/) that can be used for exploring linked data resources directly in the browser. We have found that this tool helps to better demonstrate the value and purpose of linked data to newcomers, and increases the speed at which experiments/ideas can be created and tested. We are open sourcing this software to fill what we believe is a software gap in the linked data linked data space and to hopefully encourage its growth into a valuable community tool.

## Development

Expand Down Expand Up @@ -36,5 +36,3 @@ This software is inner-source and contributions are welcome. See [Contributing.m
## License

Unless stated otherwise, the codebase is released under the [Apache2 License](https://www.apache.org/licenses/LICENSE-2.0). This covers both the codebase and any sample code in the documentation. The documentation/wiki is and available under the terms of the [Open Government License v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).

© Crown copyright 2024

0 comments on commit bdccf92

Please sign in to comment.