-
Notifications
You must be signed in to change notification settings - Fork 41
67 lines (67 loc) · 1.79 KB
/
api-server.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
name: api-server
on:
pull_request:
paths:
- '.github/workflows/api-server.yml'
- 'packages/api-server/**'
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CI: true
PIPENV_VERBOSITY: -1
jobs:
tests:
name: Tests
runs-on: ubuntu-24.04
container:
image: ghcr.io/${{ github.repository }}/minimal-rmf
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
defaults:
run:
shell: bash
working-directory: packages/api-server
steps:
- uses: actions/checkout@v4
- name: bootstrap
uses: ./.github/actions/bootstrap
with:
package: api-server
- name: tests
run: |
. /opt/rmf/setup.bash
pnpm run lint
pnpm run test:cov -v
../../.venv/bin/python -m coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
flags: api-server
build-docker-image:
# needs: tests
name: Push Docker images to GitHub Packages
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to docker
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
build-args: |
BASE_IMAGE=ghcr.io/${{ github.repository }}/minimal-rmf
ROS_DISTRO=jazzy
tags: ghcr.io/${{ github.repository }}/api-server
context: .github/api-server