-
Notifications
You must be signed in to change notification settings - Fork 68
64 lines (53 loc) · 1.69 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: CI
on: [push, pull_request]
# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo ⚡️
uses: actions/checkout@v3
- name: Create dev environment
uses: ./.github/actions/create-dev-env
- name: Run pre-commit
run:
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
test-utils:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo ⚡️
uses: actions/checkout@v3
- name: Create dev environment
uses: ./.github/actions/create-dev-env
- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pytest tests/
test-webpage-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
timeout-minutes: 30
# This is a CI job that checks if the webpage can be built
# We use the plugins metadata from caching since we don't want to
# fetch it twice and it is not essential for this job to have
# the latest generated metadata
steps:
- name: Checkout Repo ⚡️
uses: actions/checkout@v3
- name: Create dev environment
uses: ./.github/actions/create-dev-env
- name: Generate metadata
uses: ./.github/actions/generate-metadata
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Install npm dependencies and build
run: |
npm install
npm run build
working-directory: ./aiida-registry-app