Skip to content

Commit 149a0a6

Browse files
committed
Add CI
1 parent 8ad23ad commit 149a0a6

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed

.github/workflows/nox.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright 2023 Ericsson AB
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: codechecker-bazel-nox-tests
16+
17+
# Triggers the workflow on push or pull request events.
18+
on: [push, pull_request]
19+
20+
permissions: read-all
21+
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref }}
24+
cancel-in-progress: true
25+
26+
jobs:
27+
micromamba-test:
28+
name: "Nox tests (Ubuntu)"
29+
runs-on: ubuntu-24.04
30+
strategy:
31+
fail-fast: false
32+
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@v4
36+
37+
- name: System Information
38+
run: |
39+
lsb_release -a
40+
uname -a
41+
42+
- name: Install dependencies
43+
run: |
44+
pip install nox pytest
45+
46+
- name: Install micromamba and run tests
47+
run: |
48+
source .micromamba/install.sh
49+
nox

.micromamba/install.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
# ENFORCE SOURCING
4+
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
5+
echo "Usage: source setup_mamba.sh"
6+
exit 1
7+
fi
8+
9+
INSTALL_DIR="$(pwd)/bin"
10+
export MAMBA_ROOT_PREFIX="$(pwd)/micromamba"
11+
export MAMBA_EXE="$INSTALL_DIR/micromamba"
12+
13+
# DOWNLOAD IF MISSING
14+
if [ ! -f "$MAMBA_EXE" ]; then
15+
echo "Downloading micromamba to $INSTALL_DIR..."
16+
mkdir -p "$INSTALL_DIR"
17+
curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj -C "$(pwd)" bin/micromamba
18+
fi
19+
20+
#export PATH="$INSTALL_DIR:$PATH"
21+
eval "$($MAMBA_EXE shell hook --shell bash --root-prefix $MAMBA_ROOT_PREFIX)"

0 commit comments

Comments
 (0)