Skip to content

Commit 4612cde

Browse files
authored
Merge pull request #37 from vaitkus/update-github-actions
Update GitHub actions
2 parents 84bda91 + 76d6b0e commit 4612cde

File tree

1 file changed

+69
-53
lines changed

1 file changed

+69
-53
lines changed

.github/workflows/main.yml

Lines changed: 69 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,115 @@
1-
# Check that syntax is correct
1+
# Check the syntax, semantics and layout of DDLm dictionaries
22

33
name: CIFSyntaxandStyleCheck
44

5-
# Controls when the action will run. Triggers the workflow on push or pull request
6-
# events but only for the master branch
5+
# Controls when the action will run. Triggers the workflow on push or pull
6+
# request events but only for the main branch
77
on:
88
push:
9-
branches: [ master ]
9+
branches:
10+
- main
1011
paths-ignore:
11-
- '.github/**'
12+
- '.github/**'
1213

1314
pull_request:
14-
branches: [ master ]
15+
branches:
16+
- main
1517
paths-ignore:
16-
- '.github/**'
17-
workflow_dispatch:
18+
- '.github/**'
19+
20+
workflow_dispatch:
1821

1922
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2023
jobs:
2124
syntax:
22-
# The type of runner that the job will run on
25+
name: Syntax
2326
runs-on: ubuntu-latest
2427

2528
# Steps represent a sequence of tasks that will be executed as part of the job
2629
steps:
2730
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
28-
- name: checkout
29-
uses: actions/checkout@v2
30-
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
3134
# Check syntax of all CIF files
32-
- name: check_syntax
33-
uses: COMCIFS/cif_syntax_check_action@master
34-
id: cif_syntax_check
35-
ddlm:
35+
- name: Check CIF syntax
36+
uses: COMCIFS/cif_syntax_check_action@master
37+
id: cif_syntax_check
38+
39+
semantics:
40+
name: Semantics
3641
runs-on: ubuntu-latest
3742
needs: syntax
43+
3844
steps:
39-
- name: checkout
40-
uses: actions/checkout@v2
45+
- name: Checkout
46+
uses: actions/checkout@v4
47+
48+
- name: Checkout the coreCIF dictionary
49+
uses: actions/checkout@v4
50+
with:
51+
repository: COMCIFS/cif_core
52+
path: cif-dictionaries/cif_core
53+
54+
- name: Run dictionary validity checks
55+
uses: COMCIFS/dictionary_check_action@main
56+
id: ddlm_check
4157

42-
- name: check_ddlm
43-
uses: COMCIFS/dictionary_check_action@main
44-
id: ddlm_check
4558
layout:
59+
name: Layout
4660
runs-on: ubuntu-latest
4761
needs: syntax
4862

4963
steps:
5064
- name: Get the cache
51-
uses: actions/cache@v3
65+
uses: actions/cache@v4
5266
id: cache
5367
with:
54-
path: ~/.julia
55-
key: ${{ runner.os }}-julia-v2
56-
68+
path: ~/.julia
69+
key: ${{ runner.os }}-julia-v2
70+
5771
- name: Install Julia
5872
uses: julia-actions/setup-julia@v1
5973
with:
60-
version: '1.9'
74+
version: '1.9'
6175

6276
- name: Install Julia packages
6377
if: steps.cache.outputs.cache-hit != 'true'
6478
run: |
65-
julia -e 'import Pkg;Pkg.add("CrystalInfoFramework");Pkg.add("Lerche");Pkg.add("FilePaths");Pkg.add("ArgParse")'
79+
julia -e 'import Pkg;Pkg.add("CrystalInfoFramework");Pkg.add("Lerche");Pkg.add("FilePaths");Pkg.add("ArgParse")'
6680
67-
- name: checkout
68-
uses: actions/checkout@v2
81+
- name: Checkout
82+
uses: actions/checkout@v4
6983
with:
70-
path: main
71-
- name: checkout julia tools
72-
uses: actions/checkout@v2
84+
path: main
85+
86+
- name: Checkout julia tools
87+
uses: actions/checkout@v4
7388
with:
74-
repository: jamesrhester/julia_cif_tools
75-
path: julia_cif_tools
89+
repository: jamesrhester/julia_cif_tools
90+
path: julia_cif_tools
7691

77-
- name: Checkout CIF master files
78-
uses: actions/checkout@v2
92+
- name: Checkout the coreCIF dictionary
93+
uses: actions/checkout@v4
7994
with:
80-
repository: COMCIFS/cif_core
81-
path: cif_core
82-
- name: Diagnostics
95+
repository: COMCIFS/cif_core
96+
path: cif_core
97+
98+
- name: Run diagnostics
8399
run: |
84-
ls -a
85-
pwd
86-
which julia
100+
ls -a
101+
pwd
102+
which julia
87103
88-
- name: one_dict_layout
104+
- name: Run dictionary layout checks
89105
run: |
90-
julia -e 'using Pkg; Pkg.status()'
91-
for file in main/*.dic
92-
do
93-
echo "Checking $file"
94-
julia -O0 ./julia_cif_tools/linter.jl -i $PWD/cif_core $file cif_core/ddl.dic
95-
if [ $? != 0 ]
96-
then
97-
exit 1 ;
98-
fi
99-
done
106+
julia -e 'using Pkg; Pkg.status()'
107+
for file in main/*.dic
108+
do
109+
echo "Checking $file"
110+
julia -O0 ./julia_cif_tools/linter.jl -i $PWD/cif_core $file cif_core/ddl.dic
111+
if [ $? != 0 ]
112+
then
113+
exit 1 ;
114+
fi
115+
done

0 commit comments

Comments
 (0)