Skip to content
This repository was archived by the owner on May 26, 2025. It is now read-only.

Commit 0c80648

Browse files
committed
ci: use GitHub workflow and container registry
1 parent 28a4e12 commit 0c80648

2 files changed

Lines changed: 61 additions & 95 deletions

File tree

.github/workflows/ci.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
# pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
name: Build & push Docker image
13+
runs-on: ubuntu-latest
14+
env:
15+
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
16+
17+
steps:
18+
- name: Checkout repository with submodules
19+
uses: actions/checkout@v4
20+
with:
21+
submodules: recursive
22+
23+
- name: Log in to GitHub Container Registry
24+
run: echo "${GHCR_TOKEN}" | docker login ghcr.io -u "mistcommunity-bot" --password-stdin
25+
26+
- name: Build Docker image
27+
run: |
28+
docker pull mist/python3
29+
docker build --rm -t ghcr.io/${GITHUB_REPOSITORY_OWNER##*/}/tests:${GITHUB_SHA} \
30+
--build-arg API_VERSION_SHA=${{ github.sha }} \
31+
--build-arg API_VERSION_NAME=${{ github.ref_name }} .
32+
docker push ghcr.io/${GITHUB_REPOSITORY_OWNER##*/}/tests:${GITHUB_SHA}
33+
docker tag ghcr.io/${GITHUB_REPOSITORY_OWNER##*/}/tests:${GITHUB_SHA} ghcr.io/${GITHUB_REPOSITORY_OWNER##*/}/tests:latest
34+
docker push ghcr.io/${GITHUB_REPOSITORY_OWNER##*/}/tests:latest
35+
36+
# flake8:
37+
# name: Lint with flake8
38+
# runs-on: ubuntu-latest
39+
# needs: build
40+
# container:
41+
# image: registry.ops.mist.io/mistio/mist.tests:${{ github.sha }}
42+
# credentials:
43+
# username: ${{ secrets.CI_REGISTRY_USER }}
44+
# password: ${{ secrets.CI_REGISTRY_PASSWORD }}
45+
# defaults:
46+
# run:
47+
# working-directory: /mist.tests/
48+
# steps:
49+
# - name: Run flake8 checks
50+
# run: |
51+
# flake8 misttests/integration/api/mistrequests.py
52+
# flake8 misttests/integration/api/main/secrets.py
53+
# flake8 misttests/integration/api/utils.py
54+
# flake8 misttests/integration/gui/steps/browser.py
55+
# flake8 misttests/integration/gui/steps/images.py
56+
# flake8 misttests/integration/gui/steps/networks.py
57+
# flake8 misttests/integration/gui/steps/org_context.py
58+
# flake8 misttests/integration/gui/steps/popups.py
59+
# flake8 misttests/integration/gui/steps/scroll.py
60+
# flake8 misttests/integration/gui/steps/setup.py
61+
# flake8 misttests/integration/gui/steps/team.py

.gitlab-ci.yml

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)