-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (70 loc) · 2.1 KB
/
continuous-integration-workflow.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
72
73
name: CI
on: push
jobs:
setup-python:
name: Setup Python
runs-on: ubuntu-18.04
services:
postgres:
image: postgres:9.6
env:
POSTGRES_USER: scotty
POSTGRES_PASSWORD: scotty
POSTGRES_DB: scotty_test
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: install libpq-dev
run: sudo apt-get install libpq-dev #https://github.com/actions/virtual-environments/issues/12
- run: pip install poetry
- run: poetry install
- run: make check
env:
SCOTTY_DATABASE_URI: postgresql://scotty:scotty@localhost:${{ job.services.postgres.ports[5432] }}/scotty_test
setup-node:
name: Setup node-js
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- run: |
curl -o- -L https://yarnpkg.com/install.sh | bash
export PATH=$HOME/.yarn/bin:$PATH
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.x'
- run: gem install scss_lint
- name: build frontend
working-directory: webapp
run: |
yarn install
yarn lint:js
./node_modules/ember-cli/bin/ember build
check-artifacts:
name: Check ${{ matrix.artifact }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
artifact: [transporter, combadge]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v1
- uses: hecrj/setup-rust-action@master
- name: Lint
working-directory: ${{ matrix.artifact }}
run: |
rustup component add rustfmt clippy
cargo fmt -- --check
cargo clippy --all-targets --all-features -- -D warnings
- name: Test
working-directory: ${{ matrix.artifact }}
run: cargo test