-
Notifications
You must be signed in to change notification settings - Fork 2
71 lines (71 loc) · 2.46 KB
/
master.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
65
66
67
68
69
70
71
name: master
on:
workflow_dispatch: # allow to manually trigger this workflow
push:
branches: [main]
tags: ["*"]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '21'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Delete `.rustup` directory
run: rm -rf /home/runner/.rustup # to save disk space
if: runner.os == 'Linux'
- name: Delete `.cargo` directory # to save disk space
run: rm -rf /home/runner/.cargo
if: runner.os == 'Linux'
- name: Install graphviz-dev
run: sudo apt install -y graphviz-dev
if: runner.os == 'Linux'
- name: Install graphviz-dev
run: |
brew install graphviz
python -m pip install \
--global-option=build_ext \
--global-option="-I$(brew --prefix graphviz)/include/" \
--global-option="-L$(brew --prefix graphviz)/lib/" \
pygraphviz
if: runner.os == 'macOS'
- name: Install and test
run: |
npm install -g @appthreat/atom
python3.11 -m pip install --upgrade pip
python3.11 -m pip install poetry
python3.11 -m poetry config virtualenvs.create false
python3.11 -m poetry install --no-cache
python3.11 -m poetry run flake8 chenpy --count --select=E9,F63,F7,F82 --show-source --statistics
- uses: actions/cache@v3
with:
path: |
~/.sbt
~/.coursier
key: ${{ runner.os }}-sbt-${{ hashfiles('**/build.sbt') }}
- run: sbt scalafmtCheck +test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVA_TOOL_OPTIONS: "-Dfile.encoding=UTF-8 -Djna.library.path=${{ env.Python3_ROOT_DIR }}"
SCALAPY_PYTHON_LIBRARY: "python3.11"
if: runner.os != 'Windows'
- name: Compile and run tests
run: sbt scalafmtCheck +test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVA_TOOL_OPTIONS: "-Dfile.encoding=UTF-8 -Djna.library.path=${{ env.Python3_ROOT_DIR }}"
SCALAPY_PYTHON_LIBRARY: "python3"
if: runner.os == 'Windows'